parent
53f2819f9a
commit
46130378ae
@ -0,0 +1 @@
|
|||||||
|
In the TRINITY tree this is dependencies/dbus-tqt.
|
@ -0,0 +1 @@
|
|||||||
|
dbus-1-tqt
|
@ -0,0 +1,56 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 13 16:49:42 UTC 2011 - rxu@lincomlinux.org
|
||||||
|
|
||||||
|
- upgrade to trinity dbus-tqt and adjust accordingly
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 19 00:39:25 CET 2009 - jengelh@medozas.de
|
||||||
|
|
||||||
|
- add baselibs.conf as a source
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 10 12:34:56 CET 2008 - olh@suse.de
|
||||||
|
|
||||||
|
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
|
||||||
|
(bnc#437293)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 30 12:34:56 CET 2008 - olh@suse.de
|
||||||
|
|
||||||
|
- obsolete old -XXbit packages (bnc#437293)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de
|
||||||
|
|
||||||
|
- added baselibs.conf file to build xxbit packages
|
||||||
|
for multilib support
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 6 15:53:15 CET 2006 - thoenig@suse.de
|
||||||
|
|
||||||
|
- loosen dependency to D-Bus
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 20 16:42:06 CEST 2006 - thoenig@suse.de
|
||||||
|
|
||||||
|
- add dbus-qt3-do-not-close-shared-connection-thoenig-01.patch:
|
||||||
|
Do not close shared connection
|
||||||
|
- F=dbus-qt3-compile-fix-thoenig-01; mv $.diff $F.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 21 12:49:44 CEST 2006 - thoenig@suse.de
|
||||||
|
|
||||||
|
- remove hack for 64bit architectures
|
||||||
|
- use bz2 for tar ball
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 17 18:22:08 CEST 2006 - dmueller@suse.de
|
||||||
|
|
||||||
|
- really enable -fstack-protector
|
||||||
|
- fix build on x86_64
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 1 23:03:23 CEST 2006 - thoenig@suse.de
|
||||||
|
|
||||||
|
- split out binings to sparate spec files
|
||||||
|
|
@ -0,0 +1,85 @@
|
|||||||
|
--- dbus-qt3/connection.cpp 2005-04-18 05:19:17.000000000 -0600
|
||||||
|
+++ dbus-qt3/connection.cpp 2005-04-19 14:35:07.000000000 -0600
|
||||||
|
@@ -154,6 +154,7 @@
|
||||||
|
|
||||||
|
void* Connection::virtual_hook( int, void* )
|
||||||
|
{
|
||||||
|
+ return (void *)NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Connection::dbus_connection_setup_with_qt_main (DBusConnection *connection)
|
||||||
|
--- dbus-qt3/message.cpp 2005-04-18 05:19:17.000000000 -0600
|
||||||
|
+++ dbus-qt3/message.cpp 2005-04-19 14:55:32.000000000 -0600
|
||||||
|
@@ -359,6 +359,7 @@
|
||||||
|
Message Message::operator=( const Message& other )
|
||||||
|
{
|
||||||
|
//FIXME: ref the other.d->msg instead of copying it?
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Destructs message.
|
||||||
|
@@ -508,42 +509,49 @@
|
||||||
|
const dbus_bool_t right_size_bool = b;
|
||||||
|
dbus_message_append_args( d->msg, DBUS_TYPE_BOOLEAN, &right_size_bool,
|
||||||
|
DBUS_TYPE_INVALID );
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Message& Message::operator<<( Q_INT8 byte )
|
||||||
|
{
|
||||||
|
dbus_message_append_args( d->msg, DBUS_TYPE_BYTE, &byte,
|
||||||
|
DBUS_TYPE_INVALID );
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Message& Message::operator<<( Q_INT32 num )
|
||||||
|
{
|
||||||
|
dbus_message_append_args( d->msg, DBUS_TYPE_INT32, &num,
|
||||||
|
DBUS_TYPE_INVALID );
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Message& Message::operator<<( Q_UINT32 num )
|
||||||
|
{
|
||||||
|
dbus_message_append_args( d->msg, DBUS_TYPE_UINT32, &num,
|
||||||
|
DBUS_TYPE_INVALID );
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Message& Message::operator<<( Q_INT64 num )
|
||||||
|
{
|
||||||
|
dbus_message_append_args( d->msg, DBUS_TYPE_INT64, &num,
|
||||||
|
DBUS_TYPE_INVALID );
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Message& Message::operator<<( Q_UINT64 num )
|
||||||
|
{
|
||||||
|
dbus_message_append_args( d->msg, DBUS_TYPE_UINT64, &num,
|
||||||
|
DBUS_TYPE_INVALID );
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Message& Message::operator<<( double num )
|
||||||
|
{
|
||||||
|
dbus_message_append_args( d->msg, DBUS_TYPE_DOUBLE, &num,
|
||||||
|
DBUS_TYPE_INVALID );
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Message& Message::operator<<( const QString& str )
|
||||||
|
@@ -551,11 +559,13 @@
|
||||||
|
const char *u = str.utf8();
|
||||||
|
dbus_message_append_args( d->msg, DBUS_TYPE_STRING, &u,
|
||||||
|
DBUS_TYPE_INVALID );
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Message& Message::operator<<( const QVariant& custom )
|
||||||
|
{
|
||||||
|
//FIXME: imeplement
|
||||||
|
+ return (Message &)(d->msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
--- dbus-qt3/connection.cpp 2006-10-20 16:33:29.000000000 +0200
|
||||||
|
+++ dbus-qt3/connection.cpp 2006-10-20 16:33:10.000000000 +0200
|
||||||
|
@@ -106,7 +106,7 @@
|
||||||
|
|
||||||
|
void Connection::close()
|
||||||
|
{
|
||||||
|
- dbus_connection_close ( d->connection );
|
||||||
|
+ dbus_connection_unref ( d->connection );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Connection::flush()
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
In the TRINITY tree this is dependencies/dbus-1-tqt.
|
@ -0,0 +1,14 @@
|
|||||||
|
Index: tools/dbusxml2qt3/methodgen.cpp
|
||||||
|
===================================================================
|
||||||
|
--- tools/dbusxml2qt3/methodgen.cpp (Revision 805416)
|
||||||
|
+++ tools/dbusxml2qt3/methodgen.cpp (Arbeitskopie)
|
||||||
|
@@ -1740,7 +1740,8 @@
|
||||||
|
stream << " for (; it != endIt; ++it)" << endl;
|
||||||
|
stream << " {" << endl;
|
||||||
|
stream << " QDBusObjectBase* interface = it.data();" << endl;
|
||||||
|
- stream << " delete interface;" << endl;
|
||||||
|
+ stream << " if (interface != this)" << endl;
|
||||||
|
+ stream << " delete interface;" << endl;
|
||||||
|
stream << " }" << endl;
|
||||||
|
stream << " interfaces.clear();" << endl;
|
||||||
|
stream << "}" << endl;
|
@ -0,0 +1,18 @@
|
|||||||
|
--- dbus/qdbusobjectpath.h
|
||||||
|
+++ dbus/qdbusobjectpath.h
|
||||||
|
@@ -21,6 +21,9 @@
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#ifndef QDBUSOBJECTPATH_H
|
||||||
|
+#define QDBUSOBJECTPATH_H
|
||||||
|
+
|
||||||
|
#include <qcstring.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -111,3 +114,5 @@
|
||||||
|
*/
|
||||||
|
static int validate(const QCString& path);
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+#endif
|
@ -0,0 +1,58 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 13 15:57:46 UTC 2011 - rxu@lincomlinux.org
|
||||||
|
|
||||||
|
- upgrade to TQt version and adjust accordingly
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 6 15:38:51 CET 2009 - crrodriguez@suse.de
|
||||||
|
|
||||||
|
- remove static libraries and "la" files
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 8 17:15:13 CEST 2008 - hschaa@suse.de
|
||||||
|
|
||||||
|
- Add fix_circular_destructor.patch which fixes a crash in the
|
||||||
|
generated objects
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 9 17:45:53 CEST 2008 - hschaa@suse.de
|
||||||
|
|
||||||
|
- Update to SVN revision 795238 which fixes some issues with KNM
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 13 10:32:01 CET 2008 - hschaa@suse.de
|
||||||
|
|
||||||
|
- Update to 0.8.1 + SVN revision 785103
|
||||||
|
- Remove BRANCH_UPDATE.diff
|
||||||
|
- Add r785103.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 8 01:03:49 CET 2008 - dmueller@suse.de
|
||||||
|
|
||||||
|
- also allow building on s390/s390x
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 11 12:14:10 CET 2008 - hschaa@suse.de
|
||||||
|
|
||||||
|
- add ifdefs to qdbusobjectpath.h (fix_ifdef.patch)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 9 19:01:49 CET 2008 - dmueller@suse.de
|
||||||
|
|
||||||
|
- fix generation of nm introspection (branch update)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 17 16:43:44 CET 2007 - dmueller@suse.de
|
||||||
|
|
||||||
|
- include bugfixes from SVN
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 12 14:03:53 CET 2007 - hschaa@suse.de
|
||||||
|
|
||||||
|
- Added packages to PDB
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 30 13:30:33 CET 2007 - hschaa@suse.de
|
||||||
|
|
||||||
|
- Initial checkin
|
||||||
|
|
@ -0,0 +1,135 @@
|
|||||||
|
#
|
||||||
|
# spec file for package libdbus-1-tqt-0
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011 the Trinity Project (opensuse).
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.trinitydesktop.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
# norootforbuild
|
||||||
|
|
||||||
|
|
||||||
|
Name: libdbus-1-tqt-0
|
||||||
|
Url: http://www.freedesktop.org/wiki/Software/DBusBindings
|
||||||
|
%define appname libdbus-1-tqt
|
||||||
|
BuildRequires: dbus-1-devel libtqt4-devel
|
||||||
|
License: GPL v2 or later
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
AutoReqProv: on
|
||||||
|
Version: 0.8.1
|
||||||
|
Release: 1
|
||||||
|
Summary: TQt DBus Bindings
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
Source0: %{appname}-%{version}.tar.bz2
|
||||||
|
Patch1: fix_ifdef.patch
|
||||||
|
Patch2: r785103.patch
|
||||||
|
Patch3: r795238.patch
|
||||||
|
Patch4: fix_circular_destructor.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
This library provides TQt-classes for accessing the DBus
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Kevin Krammer <kevin.krammer@gmx.at>
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
License: GPL v2 or later
|
||||||
|
Summary: Development files for libdbus-1-tqt
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: dbus-1-devel libtqt4-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This library provides TQt-classes for accessing the DBus.
|
||||||
|
|
||||||
|
This package holds the development files for libdbus-1-tqt.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Kevin Krammer <kevin.krammer@gmx.at>
|
||||||
|
|
||||||
|
%package -n dbusxml2tqt
|
||||||
|
License: GPL v2 or later
|
||||||
|
Summary: Generate TQt-classes from DBus-introspection data
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n dbusxml2tqt
|
||||||
|
dbusxml2tqt allows to generate TQt-classes from DBus-introspection data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Kevin Krammer <kevin.krammer@gmx.at>
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -n %{appname}-%{version} -q
|
||||||
|
%patch1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p0
|
||||||
|
%patch4 -p0
|
||||||
|
|
||||||
|
%build
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ../
|
||||||
|
%{__make} %{?jobs:-j%jobs}
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
#install -D -m 0755 ./tools/dbusxml2qt3/dbusxml2qt3 $RPM_BUILD_ROOT%{_bindir}/dbusxml2tqt
|
||||||
|
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc README AUTHORS ChangeLog COPYING INSTALL
|
||||||
|
%{_libdir}/libdbus-1-tqt.so.0
|
||||||
|
%{_libdir}/libdbus-1-tqt.so.0.8.1
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/libdbus-1-tqt.so
|
||||||
|
%dir %{_includedir}/dbus-1.0/tqt
|
||||||
|
%dir %{_includedir}/dbus-1.0/tqt/dbus
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusconnection.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusdata.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusdataconverter.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusdatalist.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusdatamap.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbuserror.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusmacros.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusmessage.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusobject.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusobjectpath.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusproxy.h
|
||||||
|
%{_includedir}/dbus-1.0/tqt/dbus/tqdbusvariant.h
|
||||||
|
%{_libdir}/pkgconfig/dbus-1-tqt.pc
|
||||||
|
|
||||||
|
%files -n dbusxml2tqt
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_bindir}/dbusxml2tqt
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
|
@ -0,0 +1,996 @@
|
|||||||
|
diff -ur libdbus-1-qt3-0.8.1/qdbusintegrator.cpp ../dbus-qt4-qt3backport/qdbusintegrator.cpp
|
||||||
|
--- libdbus-1-qt3-0.8.1/qdbusintegrator.cpp 2007-12-17 12:34:08.000000000 +0100
|
||||||
|
+++ ../dbus-qt4-qt3backport/qdbusintegrator.cpp 2008-03-13 10:28:54.000000000 +0100
|
||||||
|
@@ -121,7 +121,7 @@
|
||||||
|
QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
|
||||||
|
|
||||||
|
int flags = dbus_watch_get_flags(watch);
|
||||||
|
- int fd = dbus_watch_get_fd(watch);
|
||||||
|
+ int fd = dbus_watch_get_unix_fd(watch);
|
||||||
|
|
||||||
|
QDBusConnectionPrivate::Watcher watcher;
|
||||||
|
if (flags & DBUS_WATCH_READABLE) {
|
||||||
|
@@ -163,7 +163,7 @@
|
||||||
|
//qDebug("remove watch");
|
||||||
|
|
||||||
|
QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
|
||||||
|
- int fd = dbus_watch_get_fd(watch);
|
||||||
|
+ int fd = dbus_watch_get_unix_fd(watch);
|
||||||
|
|
||||||
|
QDBusConnectionPrivate::WatcherHash::iterator it = d->watchers.find(fd);
|
||||||
|
if (it != d->watchers.end())
|
||||||
|
@@ -205,7 +205,7 @@
|
||||||
|
//qDebug("toggle watch");
|
||||||
|
|
||||||
|
QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
|
||||||
|
- int fd = dbus_watch_get_fd(watch);
|
||||||
|
+ int fd = dbus_watch_get_unix_fd(watch);
|
||||||
|
|
||||||
|
QDBusConnectionPrivate::WatcherHash::iterator it = d->watchers.find(fd);
|
||||||
|
if (it != d->watchers.end()) {
|
||||||
|
@@ -218,7 +218,7 @@
|
||||||
|
int flags = dbus_watch_get_flags(watch);
|
||||||
|
|
||||||
|
// qDebug("toggle watch %d to %d (write: %d, read: %d)",
|
||||||
|
-// dbus_watch_get_fd(watch), enabled,
|
||||||
|
+// dbus_watch_get_unix_fd(watch), enabled,
|
||||||
|
// flags & DBUS_WATCH_WRITABLE, flags & DBUS_WATCH_READABLE);
|
||||||
|
|
||||||
|
if (flags & DBUS_WATCH_READABLE && (*wit).read)
|
||||||
|
diff -ur libdbus-1-qt3-0.8.1/tools/dbusxml2qt3/classgen.cpp ../dbus-qt4-qt3backport/tools/dbusxml2qt3/classgen.cpp
|
||||||
|
--- libdbus-1-qt3-0.8.1/tools/dbusxml2qt3/classgen.cpp 2007-12-17 12:34:08.000000000 +0100
|
||||||
|
+++ ../dbus-qt4-qt3backport/tools/dbusxml2qt3/classgen.cpp 2008-03-13 10:28:54.000000000 +0100
|
||||||
|
@@ -38,6 +38,11 @@
|
||||||
|
insert(key, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ void removeString(const QString& key)
|
||||||
|
+ {
|
||||||
|
+ erase(key);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
void insertStringList(const QStringList& list)
|
||||||
|
{
|
||||||
|
QStringList::const_iterator it = list.begin();
|
||||||
|
@@ -194,6 +199,14 @@
|
||||||
|
forwards.insertString("class QDomElement");
|
||||||
|
if (!classData.signals.isEmpty())
|
||||||
|
forwards.insertString("class QString");
|
||||||
|
+ if (!classData.asyncMethods.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ includes["Qt"].insertString("<qmap.h>");
|
||||||
|
+ forwards.erase("template <typename K, typename V> class QMap");
|
||||||
|
+
|
||||||
|
+ includes["qdbus"].insertString("<dbus/qdbusmessage.h>");
|
||||||
|
+ forwards.erase("class QDBusMessage");
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Class::Proxy:
|
||||||
|
@@ -205,6 +218,11 @@
|
||||||
|
forwards.insertString("class QString");
|
||||||
|
if (!classData.properties.isEmpty())
|
||||||
|
forwards.insertString("class QDBusVariant");
|
||||||
|
+ if (!classData.asyncMethods.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ includes["Qt"].insertString("<qmap.h>");
|
||||||
|
+ forwards.erase("template <typename K, typename V> class QMap");
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Class::Node:
|
||||||
|
@@ -345,7 +363,7 @@
|
||||||
|
stream << "#include \"" << (*it).name.lower() << ".h\"" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
- stream << "#include \"introspectable.h\"" << endl;
|
||||||
|
+ stream << "#include \"introspectableinterface.h\"" << endl;
|
||||||
|
|
||||||
|
stream << endl;
|
||||||
|
}
|
||||||
|
@@ -442,7 +460,30 @@
|
||||||
|
static void writeMethodDeclarations(const Class& classData, Class::Role role,
|
||||||
|
QTextStream& stream)
|
||||||
|
{
|
||||||
|
- if (!classData.methods.isEmpty())
|
||||||
|
+ if (role == Class::Interface && !classData.asyncReplyMethods.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ stream << "public:" << endl;
|
||||||
|
+
|
||||||
|
+ QValueList<Method>::const_iterator it =
|
||||||
|
+ classData.asyncReplyMethods.begin();
|
||||||
|
+ QValueList<Method>::const_iterator endIt =
|
||||||
|
+ classData.asyncReplyMethods.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
+ Method method = *it;
|
||||||
|
+ method.name += "AsyncReply";
|
||||||
|
+
|
||||||
|
+ stream << " virtual void ";
|
||||||
|
+ MethodGenerator::writeMethodDeclaration(method, false, false, stream);
|
||||||
|
+
|
||||||
|
+ stream << " virtual void " << (*it).name
|
||||||
|
+ << "AsyncError(int asyncCallId, const QDBusError& error);"
|
||||||
|
+ << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!classData.methods.isEmpty() || !classData.asyncMethods.isEmpty())
|
||||||
|
{
|
||||||
|
bool pureVirtual = true;
|
||||||
|
switch (role)
|
||||||
|
@@ -465,9 +506,35 @@
|
||||||
|
QValueList<Method>::const_iterator endIt = classData.methods.end();
|
||||||
|
for (; it != endIt; ++it)
|
||||||
|
{
|
||||||
|
+ if ((*it).async) continue;
|
||||||
|
+
|
||||||
|
stream << " virtual bool ";
|
||||||
|
MethodGenerator::writeMethodDeclaration(*it, pureVirtual, true, stream);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ it = classData.asyncMethods.begin();
|
||||||
|
+ endIt = classData.asyncMethods.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
+ Method method = *it;
|
||||||
|
+ method.name += "Async";
|
||||||
|
+
|
||||||
|
+ switch (role)
|
||||||
|
+ {
|
||||||
|
+ case Class::Interface:
|
||||||
|
+ stream << " virtual void ";
|
||||||
|
+ MethodGenerator::writeMethodDeclaration(method, pureVirtual, false, stream);
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ case Class::Proxy:
|
||||||
|
+ stream << " virtual bool ";
|
||||||
|
+ MethodGenerator::writeMethodDeclaration(method, pureVirtual, true, stream);
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ case Class::Node: // no async methods
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!classData.properties.isEmpty())
|
||||||
|
@@ -511,7 +578,7 @@
|
||||||
|
switch (role)
|
||||||
|
{
|
||||||
|
case Class::Interface:
|
||||||
|
- if (!classData.methods.isEmpty())
|
||||||
|
+ if (!classData.methods.isEmpty() || !classData.asyncMethods.isEmpty())
|
||||||
|
{
|
||||||
|
stream << "protected: // implement sending replies" << endl;
|
||||||
|
stream << " virtual void handleMethodReply(const QDBusMessage& reply) = 0;" << endl;
|
||||||
|
@@ -527,15 +594,35 @@
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Class::Proxy:
|
||||||
|
+ {
|
||||||
|
if (!classData.signals.isEmpty())
|
||||||
|
{
|
||||||
|
stream << "protected slots: // usually no need to reimplement" << endl;
|
||||||
|
stream << " virtual void slotHandleDBusSignal(const QDBusMessage& message);" << endl;
|
||||||
|
stream << endl;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if (!classData.asyncReplySignals.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ if (classData.signals.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ stream << "protected slots: // usually no need to reimplement" << endl;
|
||||||
|
+ }
|
||||||
|
+ stream << " virtual void slotHandleAsyncReply(int id, const QDBusMessage& message);" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
stream << "protected:" << endl;
|
||||||
|
stream << " QDBusProxy* m_baseProxy;" << endl;
|
||||||
|
+
|
||||||
|
+ if (!classData.asyncMethods.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ stream << endl;
|
||||||
|
+ stream << " QMap<int, QString> m_asyncCalls;" << endl;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
break;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
case Class::Node: // not variable methods
|
||||||
|
break;
|
||||||
|
@@ -547,7 +634,8 @@
|
||||||
|
static void writeSignalDeclarations(const Class& classData, Class::Role role,
|
||||||
|
QTextStream& stream)
|
||||||
|
{
|
||||||
|
- if (classData.signals.isEmpty()) return;
|
||||||
|
+ if (classData.signals.isEmpty() && classData.asyncReplySignals.isEmpty())
|
||||||
|
+ return;
|
||||||
|
|
||||||
|
QString prefix;
|
||||||
|
switch (role)
|
||||||
|
@@ -578,6 +666,18 @@
|
||||||
|
MethodGenerator::writeMethodDeclaration(*it, false, false, stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ it = classData.asyncReplySignals.begin();
|
||||||
|
+ endIt = classData.asyncReplySignals.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
+ stream << prefix;
|
||||||
|
+
|
||||||
|
+ Method signal = *it;
|
||||||
|
+ signal.name += "AsyncReply";
|
||||||
|
+
|
||||||
|
+ MethodGenerator::writeMethodDeclaration(signal, false, false, stream);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
stream << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -598,8 +698,6 @@
|
||||||
|
static void writeMethodCallDeclarations(const Class& classData,
|
||||||
|
QTextStream& stream)
|
||||||
|
{
|
||||||
|
- if (classData.methods.isEmpty()) return;
|
||||||
|
-
|
||||||
|
QValueList<Method>::const_iterator it = classData.methods.begin();
|
||||||
|
QValueList<Method>::const_iterator endIt = classData.methods.end();
|
||||||
|
for (; it != endIt; ++it)
|
||||||
|
@@ -607,6 +705,26 @@
|
||||||
|
stream << " ";
|
||||||
|
MethodGenerator::writeMethodCallDeclaration(*it, stream);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if (!classData.asyncReplyMethods.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ stream << "protected:" << endl;
|
||||||
|
+ stream << " QMap<int, QDBusMessage> m_asyncCalls;" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void writeInterfaceAsyncReplyHandlers(const Class& classData,
|
||||||
|
+ QTextStream& stream)
|
||||||
|
+{
|
||||||
|
+ if (classData.asyncReplyMethods.isEmpty()) return;
|
||||||
|
+
|
||||||
|
+ QValueList<Method>::const_iterator it = classData.asyncReplyMethods.begin();
|
||||||
|
+ QValueList<Method>::const_iterator endIt = classData.asyncReplyMethods.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
+ MethodGenerator::writeInterfaceAsyncReplyHandler(classData, *it, stream);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
static void writeMethodCalls(const Class& classData, QTextStream& stream)
|
||||||
|
@@ -615,6 +733,15 @@
|
||||||
|
QValueList<Method>::const_iterator endIt = classData.methods.end();
|
||||||
|
for (; it != endIt; ++it)
|
||||||
|
{
|
||||||
|
+ if ((*it).async) continue;
|
||||||
|
+
|
||||||
|
+ MethodGenerator::writeMethodCall(classData, *it, stream);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ it = classData.asyncMethods.begin();
|
||||||
|
+ endIt = classData.asyncMethods.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
MethodGenerator::writeMethodCall(classData, *it, stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -625,6 +752,15 @@
|
||||||
|
QValueList<Method>::const_iterator endIt = classData.methods.end();
|
||||||
|
for (; it != endIt; ++it)
|
||||||
|
{
|
||||||
|
+ if ((*it).async) continue;
|
||||||
|
+
|
||||||
|
+ MethodGenerator::writeProxyMethod(classData.name, *it, stream);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ it = classData.asyncMethods.begin();
|
||||||
|
+ endIt = classData.asyncMethods.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
MethodGenerator::writeProxyMethod(classData.name, *it, stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -643,6 +779,121 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void splitAsyncProxyMethods(Class& classData)
|
||||||
|
+{
|
||||||
|
+ // create the async identifier
|
||||||
|
+ Argument idArgMethod;
|
||||||
|
+ idArgMethod.name = "asyncCallId";
|
||||||
|
+ idArgMethod.signature = "int";
|
||||||
|
+ idArgMethod.isPrimitive = true;
|
||||||
|
+ idArgMethod.direction = Argument::Out;
|
||||||
|
+
|
||||||
|
+ Argument idArgSignal = idArgMethod;
|
||||||
|
+ idArgSignal.direction = Argument::In;
|
||||||
|
+
|
||||||
|
+ QValueList<Method>::iterator it = classData.methods.begin();
|
||||||
|
+ QValueList<Method>::iterator endIt = classData.methods.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
+ if (!(*it).async) continue;
|
||||||
|
+
|
||||||
|
+ Method method = *it;
|
||||||
|
+
|
||||||
|
+ QValueList<Argument> methodArgs;
|
||||||
|
+ QValueList<Argument> signalArgs;
|
||||||
|
+
|
||||||
|
+ // add id argument
|
||||||
|
+ methodArgs << idArgMethod;
|
||||||
|
+ signalArgs << idArgSignal;
|
||||||
|
+
|
||||||
|
+ // split in/out arguments: "in" belong to the method, "out" to the new signal
|
||||||
|
+ QValueList<Argument>::const_iterator argIt = method.arguments.begin();
|
||||||
|
+ QValueList<Argument>::const_iterator argEndIt = method.arguments.end();
|
||||||
|
+ for (; argIt != argEndIt; ++argIt)
|
||||||
|
+ {
|
||||||
|
+ if ((*argIt).direction == Argument::Out)
|
||||||
|
+ {
|
||||||
|
+ // signal parameters are "out" but have "in" signature,
|
||||||
|
+ // e.g. "const T&"
|
||||||
|
+ Argument arg = *argIt;
|
||||||
|
+ arg.direction = Argument::In;
|
||||||
|
+
|
||||||
|
+ signalArgs << arg;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ methodArgs << *argIt;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // change method
|
||||||
|
+ method.arguments = methodArgs;
|
||||||
|
+
|
||||||
|
+ classData.asyncMethods << method;
|
||||||
|
+
|
||||||
|
+ // create "callback" signal
|
||||||
|
+ Method signal = method;
|
||||||
|
+ signal.arguments = signalArgs;
|
||||||
|
+
|
||||||
|
+ classData.asyncReplySignals << signal;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void splitAsyncInterfaceMethods(Class& classData)
|
||||||
|
+{
|
||||||
|
+ // create the async identifier
|
||||||
|
+ Argument idArgMethod;
|
||||||
|
+ idArgMethod.name = "asyncCallId";
|
||||||
|
+ idArgMethod.signature = "int";
|
||||||
|
+ idArgMethod.isPrimitive = true;
|
||||||
|
+ idArgMethod.direction = Argument::In;
|
||||||
|
+
|
||||||
|
+ Argument idArgReply = idArgMethod;
|
||||||
|
+
|
||||||
|
+ QValueList<Method>::iterator it = classData.methods.begin();
|
||||||
|
+ QValueList<Method>::iterator endIt = classData.methods.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
+ if (!(*it).async) continue;
|
||||||
|
+
|
||||||
|
+ Method method = *it;
|
||||||
|
+
|
||||||
|
+ QValueList<Argument> methodArgs;
|
||||||
|
+ QValueList<Argument> replyArgs;
|
||||||
|
+
|
||||||
|
+ // add id argument
|
||||||
|
+ methodArgs << idArgMethod;
|
||||||
|
+ replyArgs << idArgReply;
|
||||||
|
+
|
||||||
|
+ // split in/out arguments: "in" belong to the call, "out" to the reply
|
||||||
|
+ QValueList<Argument>::const_iterator argIt = method.arguments.begin();
|
||||||
|
+ QValueList<Argument>::const_iterator argEndIt = method.arguments.end();
|
||||||
|
+ for (; argIt != argEndIt; ++argIt)
|
||||||
|
+ {
|
||||||
|
+ if ((*argIt).direction == Argument::Out)
|
||||||
|
+ {
|
||||||
|
+ // reply parameters are "out" for the service but "in" for
|
||||||
|
+ // the reply handler
|
||||||
|
+ Argument arg = *argIt;
|
||||||
|
+ arg.direction = Argument::In;
|
||||||
|
+
|
||||||
|
+ replyArgs << arg;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ methodArgs << *argIt;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // change method
|
||||||
|
+ method.arguments = methodArgs;
|
||||||
|
+
|
||||||
|
+ classData.asyncMethods << method;
|
||||||
|
+
|
||||||
|
+ // create reply handler
|
||||||
|
+ Method reply = method;
|
||||||
|
+ reply.arguments = replyArgs;
|
||||||
|
+
|
||||||
|
+ classData.asyncReplyMethods << reply;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool ClassGenerator::initStreams(const QString& baseName,
|
||||||
|
QTextStream& headerStream,
|
||||||
|
QTextStream& sourceStream)
|
||||||
|
@@ -680,7 +931,6 @@
|
||||||
|
{
|
||||||
|
closeIncludeGuard(baseName, headerStream);
|
||||||
|
writeFileFooter(headerStream);
|
||||||
|
-
|
||||||
|
writeFileFooter(sourceStream);
|
||||||
|
|
||||||
|
QIODevice* device = headerStream.device();
|
||||||
|
@@ -717,33 +967,36 @@
|
||||||
|
QTextStream& headerStream,
|
||||||
|
QTextStream& sourceStream)
|
||||||
|
{
|
||||||
|
+ Class classDataCopy = classData;
|
||||||
|
+ splitAsyncInterfaceMethods(classDataCopy);
|
||||||
|
+
|
||||||
|
// create header
|
||||||
|
- writeHeaderIncludes(classData, Class::Interface, headerStream);
|
||||||
|
+ writeHeaderIncludes(classDataCopy, Class::Interface, headerStream);
|
||||||
|
|
||||||
|
- openNamespaces(classData.namespaces, headerStream);
|
||||||
|
- openClassDeclaration(classData, Class::Interface, headerStream);
|
||||||
|
+ openNamespaces(classDataCopy.namespaces, headerStream);
|
||||||
|
+ openClassDeclaration(classDataCopy, Class::Interface, headerStream);
|
||||||
|
|
||||||
|
- writeSignalDeclarations(classData, Class::Interface, headerStream);
|
||||||
|
- writeMethodDeclarations(classData, Class::Interface, headerStream);
|
||||||
|
- writeMethodCallDeclarations(classData, headerStream);
|
||||||
|
+ writeSignalDeclarations(classDataCopy, Class::Interface, headerStream);
|
||||||
|
+ writeMethodDeclarations(classDataCopy, Class::Interface, headerStream);
|
||||||
|
+ writeMethodCallDeclarations(classDataCopy, headerStream);
|
||||||
|
|
||||||
|
- closeClassDeclaration(classData, Class::Interface, headerStream);
|
||||||
|
- closeNamespaces(classData.namespaces, headerStream);
|
||||||
|
+ closeClassDeclaration(classDataCopy, Class::Interface, headerStream);
|
||||||
|
+ closeNamespaces(classDataCopy.namespaces, headerStream);
|
||||||
|
|
||||||
|
// create source
|
||||||
|
- writeSourceIncludes(classData, Class::Interface, sourceStream);
|
||||||
|
-
|
||||||
|
- openNamespaces(classData.namespaces, sourceStream);
|
||||||
|
+ writeSourceIncludes(classDataCopy, Class::Interface, sourceStream);
|
||||||
|
|
||||||
|
- MethodGenerator::writeIntrospectionDataMethod(classData, sourceStream);
|
||||||
|
+ openNamespaces(classDataCopy.namespaces, sourceStream);
|
||||||
|
|
||||||
|
- writeSignalEmitters(classData, sourceStream);
|
||||||
|
+ MethodGenerator::writeIntrospectionDataMethod(classDataCopy, sourceStream);
|
||||||
|
|
||||||
|
- writeMethodCalls(classData, sourceStream);
|
||||||
|
+ writeSignalEmitters(classDataCopy, sourceStream);
|
||||||
|
+ writeInterfaceAsyncReplyHandlers(classDataCopy, sourceStream);
|
||||||
|
+ writeMethodCalls(classDataCopy, sourceStream);
|
||||||
|
|
||||||
|
- MethodGenerator::writeInterfaceMainMethod(classData, sourceStream);
|
||||||
|
+ MethodGenerator::writeInterfaceMainMethod(classDataCopy, sourceStream);
|
||||||
|
|
||||||
|
- closeNamespaces(classData.namespaces, sourceStream);
|
||||||
|
+ closeNamespaces(classDataCopy.namespaces, sourceStream);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@@ -752,33 +1005,39 @@
|
||||||
|
QTextStream& headerStream,
|
||||||
|
QTextStream& sourceStream)
|
||||||
|
{
|
||||||
|
+ Class classDataCopy = classData;
|
||||||
|
+ splitAsyncProxyMethods(classDataCopy);
|
||||||
|
+
|
||||||
|
// create header
|
||||||
|
- writeHeaderIncludes(classData, Class::Proxy, headerStream);
|
||||||
|
+ writeHeaderIncludes(classDataCopy, Class::Proxy, headerStream);
|
||||||
|
|
||||||
|
- openNamespaces(classData.namespaces, headerStream);
|
||||||
|
- openClassDeclaration(classData, Class::Proxy, headerStream);
|
||||||
|
+ openNamespaces(classDataCopy.namespaces, headerStream);
|
||||||
|
+ openClassDeclaration(classDataCopy, Class::Proxy, headerStream);
|
||||||
|
|
||||||
|
- writeSignalDeclarations(classData, Class::Proxy, headerStream);
|
||||||
|
- writeMethodDeclarations(classData, Class::Proxy, headerStream);
|
||||||
|
+ writeSignalDeclarations(classDataCopy, Class::Proxy, headerStream);
|
||||||
|
+ writeMethodDeclarations(classDataCopy, Class::Proxy, headerStream);
|
||||||
|
|
||||||
|
- closeClassDeclaration(classData, Class::Proxy, headerStream);
|
||||||
|
- closeNamespaces(classData.namespaces, headerStream);
|
||||||
|
+ closeClassDeclaration(classDataCopy, Class::Proxy, headerStream);
|
||||||
|
+ closeNamespaces(classDataCopy.namespaces, headerStream);
|
||||||
|
|
||||||
|
// create source
|
||||||
|
- writeSourceIncludes(classData, Class::Proxy, sourceStream);
|
||||||
|
+ writeSourceIncludes(classDataCopy, Class::Proxy, sourceStream);
|
||||||
|
|
||||||
|
- openNamespaces(classData.namespaces, sourceStream);
|
||||||
|
+ openNamespaces(classDataCopy.namespaces, sourceStream);
|
||||||
|
|
||||||
|
- MethodGenerator::writeProxyBegin(classData, sourceStream);
|
||||||
|
+ MethodGenerator::writeProxyBegin(classDataCopy, sourceStream);
|
||||||
|
|
||||||
|
- writeProxyMethods(classData, sourceStream);
|
||||||
|
+ writeProxyMethods(classDataCopy, sourceStream);
|
||||||
|
|
||||||
|
- writeProxyProperties(classData, sourceStream);
|
||||||
|
+ writeProxyProperties(classDataCopy, sourceStream);
|
||||||
|
|
||||||
|
- if (!classData.signals.isEmpty())
|
||||||
|
- MethodGenerator::writeSignalHandler(classData, sourceStream);
|
||||||
|
+ if (!classDataCopy.signals.isEmpty())
|
||||||
|
+ MethodGenerator::writeSignalHandler(classDataCopy, sourceStream);
|
||||||
|
|
||||||
|
- closeNamespaces(classData.namespaces, sourceStream);
|
||||||
|
+ if (!classDataCopy.asyncReplySignals.isEmpty())
|
||||||
|
+ MethodGenerator::writeProxyAsyncReplyHandler(classDataCopy, sourceStream);
|
||||||
|
+
|
||||||
|
+ closeNamespaces(classDataCopy.namespaces, sourceStream);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@@ -796,7 +1055,6 @@
|
||||||
|
|
||||||
|
closeClassDeclaration(classData, Class::Node, headerStream);
|
||||||
|
closeNamespaces(classData.namespaces, headerStream);
|
||||||
|
- closeIncludeGuard(classData.name, headerStream);
|
||||||
|
|
||||||
|
// create source
|
||||||
|
writeSourceIncludes(classData, Class::Node, sourceStream);
|
||||||
|
diff -ur libdbus-1-qt3-0.8.1/tools/dbusxml2qt3/main.cpp ../dbus-qt4-qt3backport/tools/dbusxml2qt3/main.cpp
|
||||||
|
--- libdbus-1-qt3-0.8.1/tools/dbusxml2qt3/main.cpp 2007-12-17 12:34:08.000000000 +0100
|
||||||
|
+++ ../dbus-qt4-qt3backport/tools/dbusxml2qt3/main.cpp 2008-03-13 10:28:54.000000000 +0100
|
||||||
|
@@ -153,12 +153,16 @@
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
- QStringList nameParts = QStringList::split("::", options["classname"]);
|
||||||
|
+ // class name for node is handled differently later on
|
||||||
|
+ if (!generateNode)
|
||||||
|
+ {
|
||||||
|
+ QStringList nameParts = QStringList::split("::", options["classname"]);
|
||||||
|
|
||||||
|
- interfaces[0].name = nameParts.back();
|
||||||
|
+ interfaces[0].name = nameParts.back();
|
||||||
|
|
||||||
|
- nameParts.pop_back();
|
||||||
|
- interfaces[0].namespaces = nameParts;
|
||||||
|
+ nameParts.pop_back();
|
||||||
|
+ interfaces[0].namespaces = nameParts;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (checkForOption(options, "namespace"))
|
||||||
|
@@ -284,6 +288,7 @@
|
||||||
|
Method method;
|
||||||
|
method.name = "Introspect";
|
||||||
|
method.noReply = false;
|
||||||
|
+ method.async = false;
|
||||||
|
|
||||||
|
Argument argument;
|
||||||
|
argument.name = "data";
|
||||||
|
diff -ur libdbus-1-qt3-0.8.1/tools/dbusxml2qt3/methodgen.cpp ../dbus-qt4-qt3backport/tools/dbusxml2qt3/methodgen.cpp
|
||||||
|
--- libdbus-1-qt3-0.8.1/tools/dbusxml2qt3/methodgen.cpp 2007-12-17 12:34:08.000000000 +0100
|
||||||
|
+++ ../dbus-qt4-qt3backport/tools/dbusxml2qt3/methodgen.cpp 2008-03-13 10:28:54.000000000 +0100
|
||||||
|
@@ -279,6 +279,24 @@
|
||||||
|
return annotations;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static bool hasAnnotation(const QDomElement& element, const QString& annotation, QString* value = 0)
|
||||||
|
+{
|
||||||
|
+ for (QDomNode node = element.firstChild(); !node.isNull();
|
||||||
|
+ node = node.nextSibling())
|
||||||
|
+ {
|
||||||
|
+ if (!node.isElement()) continue;
|
||||||
|
+
|
||||||
|
+ QDomElement childElement = node.toElement();
|
||||||
|
+ if (childElement.tagName() != "annotation") continue;
|
||||||
|
+ if (childElement.attribute("name") != annotation) continue;
|
||||||
|
+
|
||||||
|
+ if (value != 0) *value = childElement.attribute("value");
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static QValueList<Argument> extractArguments(const QDomElement& methodElement,
|
||||||
|
Class& classData)
|
||||||
|
{
|
||||||
|
@@ -568,9 +586,13 @@
|
||||||
|
method.name = element.attribute("name");
|
||||||
|
method.arguments = extractArguments(element, classData);
|
||||||
|
method.noReply = false;
|
||||||
|
+ method.async = false;
|
||||||
|
|
||||||
|
if (element.tagName() == "method")
|
||||||
|
+ {
|
||||||
|
+ method.async = hasAnnotation(element, "org.freedesktop.DBus.GLib.Async");
|
||||||
|
classData.methods.append(method);
|
||||||
|
+ }
|
||||||
|
else
|
||||||
|
classData.signals.append(method);
|
||||||
|
}
|
||||||
|
@@ -689,36 +711,85 @@
|
||||||
|
void MethodGenerator::writeMethodCallDeclaration(const Method& method,
|
||||||
|
QTextStream& stream)
|
||||||
|
{
|
||||||
|
- stream << "QDBusMessage call" << method.name
|
||||||
|
- << "(const QDBusMessage& mesage);" << endl;
|
||||||
|
+ if (method.async)
|
||||||
|
+ stream << "void call" << method.name << "Async";
|
||||||
|
+ else
|
||||||
|
+ stream << "QDBusMessage call" << method.name;
|
||||||
|
+
|
||||||
|
+ stream << "(const QDBusMessage& message);" << endl;
|
||||||
|
stream << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MethodGenerator::writeMethodCall(const Class& classData,
|
||||||
|
const Method& method, QTextStream& stream)
|
||||||
|
{
|
||||||
|
- stream << "QDBusMessage " << classData.name << "::call" << method.name
|
||||||
|
- << "(const QDBusMessage& message)" << endl;;
|
||||||
|
+ if (method.async)
|
||||||
|
+ stream << "void " << classData.name << "::call" << method.name << "Async";
|
||||||
|
+ else
|
||||||
|
+ stream << "QDBusMessage " << classData.name << "::call" << method.name;
|
||||||
|
+
|
||||||
|
+ stream << "(const QDBusMessage& message)" << endl;
|
||||||
|
|
||||||
|
stream << "{" << endl;
|
||||||
|
- stream << " QDBusError error;" << endl;
|
||||||
|
- stream << " QDBusMessage reply;" << endl;
|
||||||
|
- stream << endl;
|
||||||
|
|
||||||
|
- writeVariables(" ", method, stream);
|
||||||
|
+ if (method.async)
|
||||||
|
+ {
|
||||||
|
+ // FIXME: using writeVariables by removing asyncCallId argument
|
||||||
|
+ Method reducedMethod = method;
|
||||||
|
+ reducedMethod.arguments.pop_front();
|
||||||
|
+
|
||||||
|
+ writeVariables(" ", reducedMethod, stream);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ stream << " QDBusError error;" << endl;
|
||||||
|
+ stream << " QDBusMessage reply;" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ writeVariables(" ", method, stream);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
stream << endl;
|
||||||
|
- stream << " if (" << method.name << "(";
|
||||||
|
+
|
||||||
|
+ if (method.async)
|
||||||
|
+ {
|
||||||
|
+ stream << " int _asyncCallId = 0;" << endl;
|
||||||
|
+ stream << " while (m_asyncCalls.find(_asyncCallId) != m_asyncCalls.end())"
|
||||||
|
+ << endl;
|
||||||
|
+ stream << " {" << endl;
|
||||||
|
+ stream << " ++_asyncCallId;" << endl;
|
||||||
|
+ stream << " }" << endl;
|
||||||
|
+ stream << " m_asyncCalls.insert(_asyncCallId, message);" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " " << method.name << "Async(";
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ stream << " if (" << method.name << "(";
|
||||||
|
|
||||||
|
QValueList<Argument>::const_iterator it = method.arguments.begin();
|
||||||
|
QValueList<Argument>::const_iterator endIt = method.arguments.end();
|
||||||
|
- for (; it != endIt; ++it)
|
||||||
|
+ while (it != endIt)
|
||||||
|
{
|
||||||
|
- stream << "_" << (*it).name << ", ";
|
||||||
|
+ stream << "_" << (*it).name;
|
||||||
|
+
|
||||||
|
+ ++it;
|
||||||
|
+ if (it != endIt) stream << ", ";
|
||||||
|
}
|
||||||
|
|
||||||
|
- stream << "error))" << endl;
|
||||||
|
+ if (method.async)
|
||||||
|
+ {
|
||||||
|
+ stream << ");" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " return;" << endl;
|
||||||
|
+ stream << "}" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
+ if (method.arguments.count() > 0) stream << ", ";
|
||||||
|
+ stream << "error))" << endl;
|
||||||
|
|
||||||
|
stream << " {" << endl;
|
||||||
|
stream << " reply = QDBusMessage::methodReply(message);" << endl;
|
||||||
|
@@ -878,6 +949,102 @@
|
||||||
|
stream << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+void MethodGenerator::writeInterfaceAsyncReplyHandler(const Class& classData,
|
||||||
|
+ const Method& method, QTextStream& stream)
|
||||||
|
+{
|
||||||
|
+ stream << "void " << classData.name << "::" << method.name
|
||||||
|
+ << "AsyncReply(";
|
||||||
|
+
|
||||||
|
+ QValueList<Argument>::const_iterator it = method.arguments.begin();
|
||||||
|
+ QValueList<Argument>::const_iterator endIt = method.arguments.end();
|
||||||
|
+ while (it != endIt)
|
||||||
|
+ {
|
||||||
|
+ if (!(*it).isPrimitive && (*it).direction == Argument::In)
|
||||||
|
+ stream << "const ";
|
||||||
|
+
|
||||||
|
+ stream << (*it).signature;
|
||||||
|
+
|
||||||
|
+ if (!(*it).isPrimitive || (*it).direction == Argument::Out) stream << "&";
|
||||||
|
+
|
||||||
|
+ stream << " " << (*it).name;
|
||||||
|
+
|
||||||
|
+ ++it;
|
||||||
|
+ if (it != endIt) stream << ", ";
|
||||||
|
+ }
|
||||||
|
+ stream << ")" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ stream << "{" << endl;
|
||||||
|
+
|
||||||
|
+ stream << " QMap<int, QDBusMessage>::iterator findIt = m_asyncCalls.find(asyncCallId);" << endl;
|
||||||
|
+ stream << " if (findIt == m_asyncCalls.end()) return;" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " QDBusMessage call = findIt.data();" << endl;
|
||||||
|
+ stream << " m_asyncCalls.erase(findIt);" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " QDBusMessage reply = QDBusMessage::methodReply(call);"
|
||||||
|
+ << endl;
|
||||||
|
+
|
||||||
|
+ it = method.arguments.begin();
|
||||||
|
+ for (++it; it != endIt; ++it) // skip asyncCallId at beginning
|
||||||
|
+ {
|
||||||
|
+ if (!(*it).annotatedType.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ stream << " QDBusData " << (*it).name << "Data;" << endl;
|
||||||
|
+
|
||||||
|
+ // TODO error handling
|
||||||
|
+ stream << " if (QDBusDataConverter::convertToQDBusData<"
|
||||||
|
+ << (*it).annotatedType << ">(" << (*it).name << ", "
|
||||||
|
+ << (*it).name << "Data"
|
||||||
|
+ << ") != QDBusDataConverter::Success) return false;"
|
||||||
|
+ << endl;
|
||||||
|
+ stream << " reply << " << (*it).name << "Data;" << endl;
|
||||||
|
+ }
|
||||||
|
+ else if (!(*it).accessor.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ stream << " reply << QDBusData::from" << (*it).accessor << "(";
|
||||||
|
+
|
||||||
|
+ if ((*it).subAccessor.isEmpty())
|
||||||
|
+ stream << (*it).name;
|
||||||
|
+ else
|
||||||
|
+ stream << (*it).containerClass << "(" << (*it).name << ")";
|
||||||
|
+
|
||||||
|
+ stream << ");" << endl;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ stream << " reply << " << (*it).name << ";" << endl;
|
||||||
|
+ }
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " handleMethodReply(reply);" << endl;
|
||||||
|
+
|
||||||
|
+ stream << "}" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << "void " << classData.name << "::" << method.name
|
||||||
|
+ << "AsyncError(int asyncCallId, const QDBusError& error)";
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << "{" << endl;
|
||||||
|
+
|
||||||
|
+ stream << " QMap<int, QDBusMessage>::iterator findIt = m_asyncCalls.find(asyncCallId);" << endl;
|
||||||
|
+ stream << " if (findIt == m_asyncCalls.end()) return;" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " QDBusMessage call = findIt.data();" << endl;
|
||||||
|
+ stream << " m_asyncCalls.erase(findIt);" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " QDBusMessage reply = QDBusMessage::methodError(call, error);"
|
||||||
|
+ << endl;
|
||||||
|
+ stream << " handleMethodReply(reply);" << endl;
|
||||||
|
+
|
||||||
|
+ stream << "}" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void MethodGenerator::writeInterfaceMainMethod(const Class& classData,
|
||||||
|
QTextStream& stream)
|
||||||
|
{
|
||||||
|
@@ -897,10 +1064,19 @@
|
||||||
|
{
|
||||||
|
stream << " if (message.member() == \"" << (*it).name << "\")" << endl;
|
||||||
|
stream << " {" << endl;
|
||||||
|
- stream << " QDBusMessage reply = call" << (*it).name << "(message);"
|
||||||
|
- << endl;
|
||||||
|
- stream << " handleMethodReply(reply);" << endl;
|
||||||
|
- stream << endl;
|
||||||
|
+
|
||||||
|
+ if ((*it).async)
|
||||||
|
+ {
|
||||||
|
+ stream << " call" << (*it).name << "Async(message);" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ stream << " QDBusMessage reply = call" << (*it).name
|
||||||
|
+ << "(message);" << endl;
|
||||||
|
+ stream << " handleMethodReply(reply);" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ }
|
||||||
|
stream << " return true;" << endl;
|
||||||
|
stream << " }" << endl;
|
||||||
|
stream << endl;
|
||||||
|
@@ -967,6 +1143,15 @@
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (!classData.asyncReplySignals.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ stream << " QObject::connect(m_baseProxy, "
|
||||||
|
+ << "SIGNAL(asyncReply(int, const QDBusMessage&))," << endl;
|
||||||
|
+ stream << " this, "
|
||||||
|
+ << " SLOT(slotHandleAsyncReply(int, const QDBusMessage&)));"
|
||||||
|
+ << endl;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
stream << "}" << endl;
|
||||||
|
|
||||||
|
stream << endl;
|
||||||
|
@@ -988,7 +1173,8 @@
|
||||||
|
void MethodGenerator::writeProxyMethod(const QString& className,
|
||||||
|
const Method& method, QTextStream& stream)
|
||||||
|
{
|
||||||
|
- stream << "bool " << className << "::" << method.name << "(";
|
||||||
|
+ stream << "bool " << className << "::" << method.name
|
||||||
|
+ << (method.async ? "Async(" : "(");
|
||||||
|
|
||||||
|
QValueList<Argument>::const_iterator it = method.arguments.begin();
|
||||||
|
QValueList<Argument>::const_iterator endIt = method.arguments.end();
|
||||||
|
@@ -1064,6 +1250,22 @@
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (method.async)
|
||||||
|
+ {
|
||||||
|
+ stream << " asyncCallId = m_baseProxy->sendWithAsyncReply(\"";
|
||||||
|
+ stream << method.name << "\", parameters);" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " if (asyncCallId != 0) m_asyncCalls[asyncCallId] = \""
|
||||||
|
+ << method.name << "\";" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ stream << " return (asyncCallId != 0);" << endl;
|
||||||
|
+ stream << "}" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
stream << " QDBusMessage reply = m_baseProxy->sendWithReply(\"";
|
||||||
|
stream << method.name << "\", parameters, &error);" << endl;
|
||||||
|
stream << endl;
|
||||||
|
@@ -1335,6 +1537,58 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+void MethodGenerator::writeProxyAsyncReplyHandler(const Class& classData,
|
||||||
|
+ QTextStream& stream)
|
||||||
|
+{
|
||||||
|
+ stream << "void " << classData.name
|
||||||
|
+ << "::slotHandleAsyncReply(int asyncCallId, const QDBusMessage& message)" << endl;
|
||||||
|
+ stream << "{" << endl;
|
||||||
|
+
|
||||||
|
+ stream << " QMap<int, QString>::iterator findIt = "
|
||||||
|
+ << "m_asyncCalls.find(asyncCallId);" << endl;
|
||||||
|
+ stream << " if (findIt == m_asyncCalls.end()) return;" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+ stream << " const QString signalName = findIt.data();" << endl;
|
||||||
|
+ stream << " m_asyncCalls.erase(findIt);" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ QValueList<Method>::const_iterator it = classData.asyncReplySignals.begin();
|
||||||
|
+ QValueList<Method>::const_iterator endIt = classData.asyncReplySignals.end();
|
||||||
|
+ bool first = true;
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
+ stream << " ";
|
||||||
|
+
|
||||||
|
+ if (!first)
|
||||||
|
+ stream << "else ";
|
||||||
|
+ else
|
||||||
|
+ first = false;
|
||||||
|
+
|
||||||
|
+ stream << "if (signalName == \"" << (*it).name << "\")" << endl;
|
||||||
|
+ stream << " {" << endl;
|
||||||
|
+
|
||||||
|
+ // FIXME tricking writeVariables and writeSignalEmit into writing
|
||||||
|
+ // the reply emit code by manipulating arguments and name
|
||||||
|
+ stream << " int _asyncCallId = asyncCallId;" << endl;
|
||||||
|
+
|
||||||
|
+ Method signal = *it;
|
||||||
|
+ signal.arguments.pop_front();
|
||||||
|
+
|
||||||
|
+ writeVariables(" ", signal, stream);
|
||||||
|
+ stream << endl;
|
||||||
|
+
|
||||||
|
+ signal = *it;
|
||||||
|
+ signal.name += "AsyncReply";
|
||||||
|
+
|
||||||
|
+ writeSignalEmit(signal, stream);
|
||||||
|
+
|
||||||
|
+ stream << " }" << endl;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ stream << "}" << endl;
|
||||||
|
+ stream << endl;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void MethodGenerator::writeIntrospectionDataMethod(const Class& classData,
|
||||||
|
QTextStream& stream)
|
||||||
|
{
|
||||||
|
diff -ur libdbus-1-qt3-0.8.1/tools/dbusxml2qt3/methodgen.h ../dbus-qt4-qt3backport/tools/dbusxml2qt3/methodgen.h
|
||||||
|
--- libdbus-1-qt3-0.8.1/tools/dbusxml2qt3/methodgen.h 2007-12-17 12:34:08.000000000 +0100
|
||||||
|
+++ ../dbus-qt4-qt3backport/tools/dbusxml2qt3/methodgen.h 2008-03-13 10:28:55.000000000 +0100
|
||||||
|
@@ -61,6 +61,7 @@
|
||||||
|
QString name;
|
||||||
|
QValueList<Argument> arguments;
|
||||||
|
bool noReply;
|
||||||
|
+ bool async;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Property : public Argument
|
||||||
|
@@ -86,6 +87,10 @@
|
||||||
|
QValueList<Method> methods;
|
||||||
|
QValueList<Method> signals;
|
||||||
|
QValueList<Property> properties;
|
||||||
|
+
|
||||||
|
+ QValueList<Method> asyncMethods;
|
||||||
|
+ QValueList<Method> asyncReplySignals;
|
||||||
|
+ QValueList<Method> asyncReplyMethods;
|
||||||
|
};
|
||||||
|
|
||||||
|
class MethodGenerator
|
||||||
|
@@ -109,6 +114,10 @@
|
||||||
|
static void writeSignalEmitter(const Class& classData, const Method& method,
|
||||||
|
QTextStream& stream);
|
||||||
|
|
||||||
|
+ static void writeInterfaceAsyncReplyHandler(const Class& classData,
|
||||||
|
+ const Method& method,
|
||||||
|
+ QTextStream& stream);
|
||||||
|
+
|
||||||
|
static void writeInterfaceMainMethod(const Class& classData,
|
||||||
|
QTextStream& stream);
|
||||||
|
|
||||||
|
@@ -125,6 +134,9 @@
|
||||||
|
static void writeProxyProperty(const Class& classData, const Property& property,
|
||||||
|
QTextStream& stream);
|
||||||
|
|
||||||
|
+ static void writeProxyAsyncReplyHandler(const Class& classData,
|
||||||
|
+ QTextStream& stream);
|
||||||
|
+
|
||||||
|
static void writeIntrospectionDataMethod(const Class& classData,
|
||||||
|
QTextStream& stream);
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
Index: dbus/qdbusdatamap.h
|
||||||
|
===================================================================
|
||||||
|
--- dbus/qdbusdatamap.h (Revision 785103)
|
||||||
|
+++ dbus/qdbusdatamap.h (Revision 795238)
|
||||||
|
@@ -173,7 +173,7 @@
|
||||||
|
}
|
||||||
|
else if (hasContainerValueType())
|
||||||
|
{
|
||||||
|
- if (it.data()->buildSignature() != containerSignature)
|
||||||
|
+ if (it.data().buildDBusSignature() != containerSignature)
|
||||||
|
{
|
||||||
|
m_valueType = QDBusData::Invalid;
|
||||||
|
m_containerValueType = QDBusData();
|
||||||
|
Index: dbus/qdbuserror.h
|
||||||
|
===================================================================
|
||||||
|
--- dbus/qdbuserror.h (Revision 785103)
|
||||||
|
+++ dbus/qdbuserror.h (Revision 795238)
|
||||||
|
@@ -119,7 +119,7 @@
|
||||||
|
* Returned by QDBusConnection's addConnection if the specified address
|
||||||
|
* isn't a valid D-Bus bus address.
|
||||||
|
*
|
||||||
|
- * @see QDBusConnection:::addConnection(const QString&,const QString&);
|
||||||
|
+ * @see QDBusConnection::addConnection(const QString&,const QString&);
|
||||||
|
*/
|
||||||
|
BadAddress,
|
||||||
|
|
||||||
|
Index: tools/dbusxml2qt3/classgen.cpp
|
||||||
|
===================================================================
|
||||||
|
--- tools/dbusxml2qt3/classgen.cpp (Revision 785103)
|
||||||
|
+++ tools/dbusxml2qt3/classgen.cpp (Revision 795238)
|
||||||
|
@@ -168,6 +168,17 @@
|
||||||
|
extractForwardDeclarations(*it, forwards);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ it = classData.signals.begin();
|
||||||
|
+ endIt = classData.signals.end();
|
||||||
|
+ for (; it != endIt; ++it)
|
||||||
|
+ {
|
||||||
|
+ if ((*it).arguments.isEmpty()) continue;
|
||||||
|
+
|
||||||
|
+ extractHeaderIncludes(*it, includes);
|
||||||
|
+ extractForwardDeclarations(*it, forwards);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
QValueList<Property>::const_iterator propertyIt = classData.properties.begin();
|
||||||
|
QValueList<Property>::const_iterator propertyEndIt = classData.properties.end();
|
||||||
|
for (; propertyIt != propertyEndIt; ++propertyIt)
|
||||||
|
Index: dbus-1-qt3.pc.in
|
||||||
|
===================================================================
|
||||||
|
--- dbus-1-qt3.pc.in (Revision 785103)
|
||||||
|
+++ dbus-1-qt3.pc.in (Revision 795238)
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
-libdir=${prefix}/lib
|
||||||
|
+libdir=@libdir@
|
||||||
|
includedir=${prefix}/include/dbus-1.0/qt3
|
||||||
|
|
||||||
|
Name: dbus-1-qt3
|
Binary file not shown.
@ -0,0 +1,126 @@
|
|||||||
|
package: kdelibs-3.5.10.tar.bz2
|
||||||
|
kdemod: kdelibs
|
||||||
|
Index: BRANCH_STATUS
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ BRANCH_STATUS
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+current HEAD: 859452
|
||||||
|
+svn di between //tags/KDE/3.5.10/kdelibs and //branches/KDE/3.5/kdelibs
|
||||||
|
Index: kinit/start_kdeinit.c
|
||||||
|
===================================================================
|
||||||
|
--- kinit/start_kdeinit.c.orig
|
||||||
|
+++ kinit/start_kdeinit.c
|
||||||
|
@@ -44,7 +44,7 @@ static int set_protection( pid_t pid, in
|
||||||
|
{
|
||||||
|
char buf[ 1024 ];
|
||||||
|
int procfile;
|
||||||
|
- sprintf( buf, "/proc/%d/oom_adj", pid );
|
||||||
|
+ sprintf( buf, "/proc/%d/stat", pid );
|
||||||
|
if( !enable ) {
|
||||||
|
/* Be paranoid and check that the pid we got from the pipe
|
||||||
|
belongs to this user. */
|
||||||
|
@@ -52,6 +52,7 @@ static int set_protection( pid_t pid, in
|
||||||
|
if( lstat( buf, &st ) < 0 || st.st_uid != getuid())
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+ sprintf( buf, "/proc/%d/oom_adj", pid );
|
||||||
|
procfile = open( buf, O_WRONLY );
|
||||||
|
if( procfile >= 0 ) {
|
||||||
|
if( enable )
|
||||||
|
Index: kio/kio/configure.in.in
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/configure.in.in.orig
|
||||||
|
+++ kio/kio/configure.in.in
|
||||||
|
@@ -139,8 +139,30 @@ if test "x$kde_enable_inotify" = "xyes";
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
])
|
||||||
|
|
||||||
|
- if test "$kde_cv_have_inotify" = "yes" ; then
|
||||||
|
+ AC_CACHE_VAL(kde_cv_have_sys_inotify,
|
||||||
|
+ [
|
||||||
|
+ kde_cv_have_sys_inotify=no
|
||||||
|
+ AC_LANG_SAVE
|
||||||
|
+ AC_LANG_C
|
||||||
|
+
|
||||||
|
+ AC_TRY_COMPILE(
|
||||||
|
+ [
|
||||||
|
+#include <sys/inotify.h>
|
||||||
|
+ ],
|
||||||
|
+ [
|
||||||
|
+#ifndef IN_ALL_EVENTS
|
||||||
|
+#error no inotify notification
|
||||||
|
+#endif
|
||||||
|
+ ],kde_cv_have_sys_inotify=yes,kde_cv_have_sys_inotify=no)
|
||||||
|
+
|
||||||
|
+ AC_LANG_RESTORE
|
||||||
|
+ ])
|
||||||
|
+
|
||||||
|
+ if test "$kde_cv_have_inotify" = "yes" -o "$kde_cv_have_sys_inotify" = "yes"; then
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_INOTIFY, 1, [Define if your system has Linux Inode Notification])
|
||||||
|
+ if test "$kde_cv_have_sys_inotify" = "yes"; then
|
||||||
|
+ AC_DEFINE_UNQUOTED(HAVE_SYS_INOTIFY, 1, [Define if your system has glibc support for inotify])
|
||||||
|
+ fi
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
Index: kio/kio/kdirwatch.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kdirwatch.cpp.orig
|
||||||
|
+++ kio/kio/kdirwatch.cpp
|
||||||
|
@@ -64,11 +64,13 @@
|
||||||
|
// debug
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
|
-#ifdef HAVE_INOTIFY
|
||||||
|
+#ifdef HAVE_SYS_INOTIFY
|
||||||
|
+#include <sys/inotify.h>
|
||||||
|
+#include <fcntl.h>
|
||||||
|
+#elif HAVE_INOTIFY
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
-#include <linux/types.h>
|
||||||
|
// Linux kernel headers are documented to not compile
|
||||||
|
#define _S390_BITOPS_H
|
||||||
|
#include <linux/inotify.h>
|
||||||
|
@@ -87,7 +89,9 @@ static inline int inotify_rm_watch (int
|
||||||
|
{
|
||||||
|
return syscall (__NR_inotify_rm_watch, fd, wd);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
+#ifdef HAVE_INOTIFY
|
||||||
|
#ifndef IN_ONLYDIR
|
||||||
|
#define IN_ONLYDIR 0x01000000
|
||||||
|
#endif
|
||||||
|
@@ -99,7 +103,6 @@ static inline int inotify_rm_watch (int
|
||||||
|
#ifndef IN_MOVE_SELF
|
||||||
|
#define IN_MOVE_SELF 0x00000800
|
||||||
|
#endif
|
||||||
|
-
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
Index: kdoctools/customization/pt-BR/user.entities
|
||||||
|
===================================================================
|
||||||
|
--- kdoctools/customization/pt-BR/user.entities.orig
|
||||||
|
+++ kdoctools/customization/pt-BR/user.entities
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
<!ENTITY Esc "<keycap>Esc</keycap>">
|
||||||
|
<!ENTITY etc "<abbrev>etc</abbrev>">
|
||||||
|
<!ENTITY ex "<abbrev>por exemplo</abbrev>">
|
||||||
|
-<!ENTITY FAQ "Perguntas Mais Freqüentes (do inglês <acronym>FAQ</acronym>)">
|
||||||
|
+<!ENTITY FAQ "Perguntas mais freqüentes (do inglês <acronym>FAQ</acronym>)">
|
||||||
|
<!ENTITY HTML '<acronym>HTML</acronym>'>
|
||||||
|
<!ENTITY ie "isto é">
|
||||||
|
<!ENTITY infocenter "<application>Centro de Informações</application>">
|
||||||
|
@@ -34,7 +34,7 @@
|
||||||
|
<!ENTITY LMB "botão <mousebutton>esquerdo</mousebutton> do mouse">
|
||||||
|
<!ENTITY MMB "botão do <mousebutton>meio</mousebutton> do mouse">
|
||||||
|
<!ENTITY OS "<acronym>Sistema Operacional</acronym>">
|
||||||
|
-<!ENTITY RMB "botão <mousebutton>direto</mousebutton> do mouse">
|
||||||
|
+<!ENTITY RMB "botão <mousebutton>direito</mousebutton> do mouse">
|
||||||
|
<!ENTITY Shift "<keycap>Shift</keycap>">
|
||||||
|
<!ENTITY systemtray "<application>bandeja do sistema</application>">
|
||||||
|
<!ENTITY Tab "<keycap>Tab</keycap>">
|
@ -0,0 +1,139 @@
|
|||||||
|
Index: kdelibs-3.5.10/CATALOG.kdelibs3
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ kdelibs-3.5.10/CATALOG.kdelibs3
|
||||||
|
@@ -0,0 +1,134 @@
|
||||||
|
+--
|
||||||
|
+Catalogue for KDE DocBook XML
|
||||||
|
+
|
||||||
|
+Copyright (C) 2001,2002 Frederik Fouvry
|
||||||
|
+
|
||||||
|
+This program is free software; you can redistribute it and/or
|
||||||
|
+modify it under the terms of the GNU General Public License
|
||||||
|
+as published by the Free Software Foundation; either version 2
|
||||||
|
+of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+This program is distributed in the hope that it will be useful,
|
||||||
|
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+GNU General Public License for more details.
|
||||||
|
+
|
||||||
|
+You should have received a copy of the GNU General Public License
|
||||||
|
+along with this program; if not, write to the Free Software
|
||||||
|
+Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
+
|
||||||
|
+Send suggestions, comments, etc. to the KDE DocBook mailing list
|
||||||
|
+<kde-docbook@kde.org>.
|
||||||
|
+--
|
||||||
|
+
|
||||||
|
+OVERRIDE YES
|
||||||
|
+-- SGMLDECL "xml.dcl" --
|
||||||
|
+DTDDECL "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" /usr/share/sgml/opensp/xml.dcl
|
||||||
|
+DTDDECL "-//KDE//ELEMENTS DocBook XML Hierarchy Redeclarations 2 V1.0//EN" /usr/share/sgml/opensp/xml.dcl
|
||||||
|
+DTDDECL "-//KDE//ELEMENTS DocBook XML Pool Redeclarations V1.1//EN" /usr/share/sgml/opensp/xml.dcl
|
||||||
|
+DTDDECL "-//KDE//ELEMENTS DocBook XML Modifications (Restrictions) V1.1//EN" /usr/share/sgml/opensp/xml.dcl
|
||||||
|
+DTDDECL "-//KDE//ENTITIES DocBook XML General Entity Declarations V1.2//EN" /usr/share/sgml/opensp/xml.dcl
|
||||||
|
+DTDDECL "-//KDE//ENTITIES DocBook XML General Entity Declarations (Persons) V1.0//EN" /usr/share/sgml/opensp/xml.dcl
|
||||||
|
+DTDDECL "-//KDE//ENTITIES DocBook XML Localisation Entity Declarations V1.0//EN" /usr/share/sgml/opensp/xml.dcl
|
||||||
|
+
|
||||||
|
+ -- DocBook --
|
||||||
|
+
|
||||||
|
+-- DocBook 4.2 KDE Variant V1.1 --
|
||||||
|
+
|
||||||
|
+PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN"
|
||||||
|
+ "dtd/kdex.dtd"
|
||||||
|
+PUBLIC "-//KDE//ELEMENTS DocBook XML Hierarchy Redeclarations 2 V1.0//EN"
|
||||||
|
+ "dtd/rdbhier2.elements"
|
||||||
|
+PUBLIC "-//KDE//ELEMENTS DocBook XML Pool Redeclarations V1.1//EN"
|
||||||
|
+ "dtd/rdbpool.elements"
|
||||||
|
+PUBLIC "-//KDE//ELEMENTS DocBook XML Modifications (Restrictions) V1.1//EN"
|
||||||
|
+ "dtd/modifications.elements"
|
||||||
|
+
|
||||||
|
+PUBLIC "-//KDE//ENTITIES DocBook XML General Entity Declarations V1.2//EN"
|
||||||
|
+ "entities/general.entities"
|
||||||
|
+PUBLIC "-//KDE//ENTITIES DocBook XML General Entity Declarations (Persons) V1.0//EN"
|
||||||
|
+ "entities/contributor.entities"
|
||||||
|
+
|
||||||
|
+ -- General KDE Entities --
|
||||||
|
+
|
||||||
|
+PUBLIC "-//KDE//ENTITIES DocBook XML Localisation Entity Declarations V1.0//EN"
|
||||||
|
+ "entities/l10n.entities"
|
||||||
|
+
|
||||||
|
+ -- Various external files --
|
||||||
|
+
|
||||||
|
+-- only DocBook XML files are in entities, the others are in
|
||||||
|
+ kdelibs/doc/common or in kdelibs/licenses --
|
||||||
|
+
|
||||||
|
+PUBLIC "-//GNU//DOCUMENT GNU General Public License V2//EN"
|
||||||
|
+ "entities/gpl-license"
|
||||||
|
+PUBLIC "-//GNU//DOCUMENT GNU Lesser General Public License V2.1//EN"
|
||||||
|
+ "entities/lgpl-license"
|
||||||
|
+PUBLIC "-//GNU//DOCUMENT GNU Free Documentation License V1.1//EN"
|
||||||
|
+ "entities/fdl-license"
|
||||||
|
+PUBLIC "-//KDE//DOCUMENT X11 License//EN"
|
||||||
|
+ "entities/x11-license"
|
||||||
|
+PUBLIC "-//KDE//DOCUMENT BSD License//EN"
|
||||||
|
+ "entities/bsd-license"
|
||||||
|
+PUBLIC "-//KDE//DOCUMENT Artistic License//EN"
|
||||||
|
+ "entities/artistic-license"
|
||||||
|
+
|
||||||
|
+CATALOG af/catalog
|
||||||
|
+CATALOG bg/catalog
|
||||||
|
+CATALOG ca/catalog
|
||||||
|
+CATALOG cs/catalog
|
||||||
|
+CATALOG da/catalog
|
||||||
|
+CATALOG de/catalog
|
||||||
|
+CATALOG el/catalog
|
||||||
|
+CATALOG en/catalog
|
||||||
|
+CATALOG en-GB/catalog
|
||||||
|
+CATALOG es/catalog
|
||||||
|
+CATALOG et/catalog
|
||||||
|
+CATALOG fi/catalog
|
||||||
|
+CATALOG fo/catalog
|
||||||
|
+CATALOG fr/catalog
|
||||||
|
+CATALOG he/catalog
|
||||||
|
+CATALOG hu/catalog
|
||||||
|
+CATALOG id/catalog
|
||||||
|
+CATALOG it/catalog
|
||||||
|
+CATALOG ja/catalog
|
||||||
|
+CATALOG ko/catalog
|
||||||
|
+CATALOG lt/catalog
|
||||||
|
+CATALOG nl/catalog
|
||||||
|
+CATALOG no/catalog -- considered to be the same as nb --
|
||||||
|
+CATALOG nn/catalog -- incorrectly known as no_NY --
|
||||||
|
+CATALOG pl/catalog
|
||||||
|
+CATALOG pt-BR/catalog
|
||||||
|
+CATALOG pt/catalog
|
||||||
|
+CATALOG ro/catalog
|
||||||
|
+CATALOG ru/catalog
|
||||||
|
+CATALOG sk/catalog
|
||||||
|
+CATALOG sl/catalog
|
||||||
|
+CATALOG sr/catalog
|
||||||
|
+CATALOG sv/catalog
|
||||||
|
+CATALOG tr/catalog
|
||||||
|
+CATALOG uk/catalog
|
||||||
|
+CATALOG wa/catalog
|
||||||
|
+CATALOG xh/catalog
|
||||||
|
+CATALOG zh-CN/catalog
|
||||||
|
+CATALOG zh-TW/catalog
|
||||||
|
+
|
||||||
|
+-- DocBook 4.1.2 KDE Variant V1.1 --
|
||||||
|
+
|
||||||
|
+PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN"
|
||||||
|
+ "obsolete/kdex.dtd"
|
||||||
|
+PUBLIC "-//KDE//ENTITIES DocBook XML General Entity Declarations V1.1//EN"
|
||||||
|
+ "obsolete/general.entities"
|
||||||
|
+PUBLIC "-//KDE//ELEMENTS DocBook XML Pool Redeclarations V1.0//EN"
|
||||||
|
+ "obsolete/rdbpool.elements"
|
||||||
|
+PUBLIC "-//KDE//ELEMENTS DocBook XML Modifications V1.0//EN"
|
||||||
|
+ "obsolete/modifications.elements"
|
||||||
|
+
|
||||||
|
+-- DocBook 4.1.2 KDE Variant V1.0 --
|
||||||
|
+
|
||||||
|
+PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.0//EN"
|
||||||
|
+ "obsolete/kdex-412-10.dtd"
|
||||||
|
+
|
||||||
|
+-- DocBook 4.1 KDE Variant V1.0 --
|
||||||
|
+
|
||||||
|
+PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN"
|
||||||
|
+ "obsolete/kdex-412-10.dtd"
|
@ -0,0 +1,14 @@
|
|||||||
|
Index: kdecore/klocale.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/klocale.cpp.orig
|
||||||
|
+++ kdecore/klocale.cpp
|
||||||
|
@@ -131,6 +131,9 @@ void KLocale::initMainCatalogues(const Q
|
||||||
|
d->catalogNames.append( mainCatalogue ); // application catalog
|
||||||
|
d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo
|
||||||
|
d->catalogNames.append( "kio" ); // always include kio.mo
|
||||||
|
+ KGlobal::dirs()->addResourceDir("locale", "/usr/share/locale");
|
||||||
|
+ d->catalogNames.append( "desktop_translations" );
|
||||||
|
+ d->catalogNames.append( "susetranslations" );
|
||||||
|
updateCatalogues(); // evaluate this for all languages
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
Index: admin/acinclude.m4.in
|
||||||
|
===================================================================
|
||||||
|
--- admin/acinclude.m4.in.orig
|
||||||
|
+++ admin/acinclude.m4.in
|
||||||
|
@@ -4988,6 +4988,7 @@ AC_DEFUN([KDE_SET_PREFIX_CORE],
|
||||||
|
fi
|
||||||
|
# And delete superfluous '/' to make compares easier
|
||||||
|
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
|
||||||
|
+ kde_libs_htmldir=$prefix/share/doc/HTML/
|
||||||
|
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
|
||||||
|
|
||||||
|
kde_libs_prefix='$(prefix)'
|
||||||
|
Index: admin/detect-autoconf.pl
|
||||||
|
===================================================================
|
||||||
|
--- admin/detect-autoconf.pl.orig
|
||||||
|
+++ admin/detect-autoconf.pl
|
||||||
|
@@ -216,7 +216,7 @@ $unsermake = "";
|
||||||
|
# backward compatible: if $UNSERMAKE points to a path, use it
|
||||||
|
$unsermake = findProgram('unsermake') if (defined($ENV{'UNSERMAKE'}) and $ENV{'UNSERMAKE'} =~ /\//);
|
||||||
|
# new compatible: if it says 'yes', use the one from path
|
||||||
|
-$unsermake = which('unsermake') if ($ENV{'UNSERMAKE'} ne 'no');
|
||||||
|
+$unsermake = which('unsermake') if ($ENV{'UNSERMAKE'} eq 'yes');
|
||||||
|
|
||||||
|
($automake_suffix) = $automake =~ /.*automake(.*)$/;
|
||||||
|
|
||||||
|
|
||||||
|
--- admin/cvs.sh
|
||||||
|
+++ admin/cvs.sh
|
||||||
|
@@ -32,7 +32,7 @@ check_autotool_versions()
|
||||||
|
required_autoconf_version="2.53 or newer"
|
||||||
|
AUTOCONF_VERSION=`$AUTOCONF --version | head -n 1`
|
||||||
|
case $AUTOCONF_VERSION in
|
||||||
|
- Autoconf*2.5* | autoconf*2.5* | autoconf*2.6* ) : ;;
|
||||||
|
+ autoconf* ) : ;;
|
||||||
|
"" )
|
||||||
|
echo "*** AUTOCONF NOT FOUND!."
|
||||||
|
echo "*** KDE requires autoconf $required_autoconf_version"
|
||||||
|
@@ -47,7 +47,7 @@ esac
|
||||||
|
|
||||||
|
AUTOHEADER_VERSION=`$AUTOHEADER --version | head -n 1`
|
||||||
|
case $AUTOHEADER_VERSION in
|
||||||
|
- Autoconf*2.5* | autoheader*2.5* | autoheader*2.6* ) : ;;
|
||||||
|
+ autoheader* ) : ;;
|
||||||
|
"" )
|
||||||
|
echo "*** AUTOHEADER NOT FOUND!."
|
||||||
|
echo "*** KDE requires autoheader $required_autoconf_version"
|
||||||
|
@@ -68,7 +68,7 @@ case $AUTOMAKE_STRING in
|
||||||
|
echo "*** KDE requires automake $required_automake_version"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
- automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9* | automake*1.10*)
|
||||||
|
+ automake*)
|
||||||
|
echo "*** $AUTOMAKE_STRING found."
|
||||||
|
UNSERMAKE=no
|
||||||
|
;;
|
Binary file not shown.
@ -0,0 +1,32 @@
|
|||||||
|
Index: kdecore/kapplication.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kapplication.cpp.orig
|
||||||
|
+++ kdecore/kapplication.cpp
|
||||||
|
@@ -87,6 +87,8 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#endif
|
||||||
|
#include <sys/wait.h>
|
||||||
|
+#include <grp.h>
|
||||||
|
+#include <sys/types.h>
|
||||||
|
|
||||||
|
#ifndef Q_WS_WIN
|
||||||
|
#include "kwin.h"
|
||||||
|
@@ -776,10 +778,15 @@ void KApplication::init(bool GUIenabled)
|
||||||
|
{
|
||||||
|
d->guiEnabled = GUIenabled;
|
||||||
|
if ((getuid() != geteuid()) ||
|
||||||
|
- (getgid() != getegid()))
|
||||||
|
+ (getgid() != getegid()) )
|
||||||
|
{
|
||||||
|
- fprintf(stderr, "The KDE libraries are not designed to run with suid privileges.\n");
|
||||||
|
- ::exit(127);
|
||||||
|
+ // man permissions are not exploitable and better than
|
||||||
|
+ // world writable directories
|
||||||
|
+ struct group *man = getgrnam("man");
|
||||||
|
+ if ( !man || man->gr_gid != getegid() ){
|
||||||
|
+ fprintf(stderr, "The KDE libraries are not designed to run with suid privileges.\n");
|
||||||
|
+ ::exit(127);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
KProcessController::ref();
|
@ -0,0 +1,36 @@
|
|||||||
|
arts:KDE bindings for arts including knotify
|
||||||
|
dcop:The DCOP communications library
|
||||||
|
interfaces:Defines interfaces for common components so that new implementations can be dropped in
|
||||||
|
kabc:Access to the KDE address book
|
||||||
|
kate:Interfaces for the standard text editor KPart
|
||||||
|
kdecore: Core KDE classes that are not related to the user interface
|
||||||
|
kded:The KDE daemon interface, to observe your file system
|
||||||
|
kdejava:The KDE Java enviroment
|
||||||
|
kdeprint:High level printer control functionality
|
||||||
|
kdeui:KDE User interface classes such as widgets
|
||||||
|
kfile:High level access to the KDE network aware file abstraction
|
||||||
|
khtml:The KDE HTML component
|
||||||
|
kio:Low level access to network files. Also provides access to facilities such as KDirWatcher which monitors directories for changes
|
||||||
|
kjs:Javascript (aka. ECMAScript and JScript) support
|
||||||
|
kparts:Support for re-usable, embeddable, extendable applications
|
||||||
|
kspell:Easy access to the spell checker
|
||||||
|
kspell2:Easy access to the spell checker
|
||||||
|
kdefx:A library with pixmap effects
|
||||||
|
kssl:KDE secure socket layer interface
|
||||||
|
kutils:High-level utils, like search/replace support
|
||||||
|
kmdi:MultiDocument Interface library
|
||||||
|
kresources:The KDE resources system
|
||||||
|
kwallet:KDE password manager classes
|
||||||
|
kdeprint:High level printer control functionality
|
||||||
|
libkmid:Midi library
|
||||||
|
knewstuff:Upload and download of application data
|
||||||
|
dnssd:mDNS support library to request and register network services
|
||||||
|
kdemm:KDE Multimedia Framework
|
||||||
|
kcmshell:KControl module shell
|
||||||
|
kdesu:Change user helper framework
|
||||||
|
kdoctools:Documentation support
|
||||||
|
kimgio:Image Handlers
|
||||||
|
kinit:KDEinit support
|
||||||
|
kioslave:Basic IO slaves
|
||||||
|
kunittest:Support for unit tests
|
||||||
|
libkscreensaver:KDE screensavers
|
@ -0,0 +1,19 @@
|
|||||||
|
Index: kded/kbuildsycoca.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kded/kbuildsycoca.cpp.orig
|
||||||
|
+++ kded/kbuildsycoca.cpp
|
||||||
|
@@ -378,8 +378,12 @@ bool KBuildSycoca::build()
|
||||||
|
|
||||||
|
connect(g_vfolder, SIGNAL(newService(const QString &, KService **)),
|
||||||
|
this, SLOT(slotCreateEntry(const QString &, KService **)));
|
||||||
|
-
|
||||||
|
- VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("applications.menu", true);
|
||||||
|
+
|
||||||
|
+ VFolderMenu::SubMenu *kdeMenu;
|
||||||
|
+ if ( QFile::exists( "/etc/xdg/menus/applications.menu" ) )
|
||||||
|
+ kdeMenu = g_vfolder->parseMenu("applications.menu", true);
|
||||||
|
+ else
|
||||||
|
+ kdeMenu = g_vfolder->parseMenu("applications.menu.kde", true);
|
||||||
|
|
||||||
|
KServiceGroup *entry = g_bsgf->addNew("/", kdeMenu->directoryFile, 0, false);
|
||||||
|
entry->setLayoutInfo(kdeMenu->layoutList);
|
@ -0,0 +1,66 @@
|
|||||||
|
2009-12-10 Stepan Kasal <skasal@redhat.com>
|
||||||
|
|
||||||
|
The change of implementation of AC_REQUIRE in 2.64 caused a regression
|
||||||
|
in the arts project.
|
||||||
|
This can be fixed by shuffling some macro calls.
|
||||||
|
|
||||||
|
I suppose that most of this patch will not be needed with a future
|
||||||
|
release of Autoconf.
|
||||||
|
But the last chunk of this patch is a real bug in this source and
|
||||||
|
should go upstream.
|
||||||
|
|
||||||
|
--- arts-1.5.10/admin/acinclude.m4.in 2008-08-20 18:07:05.000000000 +0200
|
||||||
|
+++ arts-1.5.10/admin/acinclude.m4.in 2009-12-09 17:30:57.000000000 +0100
|
||||||
|
@@ -3081,8 +3081,18 @@
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
+AC_DEFUN([AC_CHECK_COMPILERS_CC],
|
||||||
|
+[
|
||||||
|
+ dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
|
||||||
|
+ CFLAGS=" $CFLAGS"
|
||||||
|
+ AC_PROG_CC
|
||||||
|
+ CXXFLAGS=" $CXXFLAGS"
|
||||||
|
+ AC_PROG_CXX
|
||||||
|
+])
|
||||||
|
+
|
||||||
|
AC_DEFUN([AC_CHECK_COMPILERS],
|
||||||
|
[
|
||||||
|
+ AC_REQUIRE([AC_CHECK_COMPILERS_CC])
|
||||||
|
AC_ARG_ENABLE(debug,
|
||||||
|
AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
|
||||||
|
[
|
||||||
|
@@ -3141,11 +3151,6 @@
|
||||||
|
[kde_use_profiling="no"]
|
||||||
|
)
|
||||||
|
|
||||||
|
- dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
|
||||||
|
- CFLAGS=" $CFLAGS"
|
||||||
|
-
|
||||||
|
- AC_PROG_CC
|
||||||
|
-
|
||||||
|
AC_PROG_CPP
|
||||||
|
|
||||||
|
if test "$GCC" = "yes"; then
|
||||||
|
@@ -3174,10 +3179,6 @@
|
||||||
|
LDFLAGS=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
- CXXFLAGS=" $CXXFLAGS"
|
||||||
|
-
|
||||||
|
- AC_PROG_CXX
|
||||||
|
-
|
||||||
|
KDE_CHECK_FOR_BAD_COMPILER
|
||||||
|
|
||||||
|
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
|
||||||
|
@@ -3503,8 +3504,8 @@
|
||||||
|
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
|
||||||
|
AC_REQUIRE([KDE_CHECK_LIB64])
|
||||||
|
|
||||||
|
-AC_OBJEXT
|
||||||
|
-AC_EXEEXT
|
||||||
|
+AC_REQUIRE([AC_OBJEXT])
|
||||||
|
+AC_REQUIRE([AC_EXEEXT])
|
||||||
|
|
||||||
|
AM_PROG_LIBTOOL
|
||||||
|
AC_LIBTOOL_CXX
|
@ -0,0 +1,46 @@
|
|||||||
|
Index: kdecore/eventsrc
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/eventsrc.orig
|
||||||
|
+++ kdecore/eventsrc
|
||||||
|
@@ -2572,7 +2572,7 @@ Comment[wa]=On messaedje critike est hå
|
||||||
|
Comment[zh_CN]=正在显示关键消息
|
||||||
|
Comment[zh_HK]=顯示嚴重警告訊息
|
||||||
|
Comment[zh_TW]=嚴重的警告訊息已顯示
|
||||||
|
-default_sound=KDE_Glass_Break.ogg
|
||||||
|
+default_sound=KDE_Error_1.ogg
|
||||||
|
default_presentation=65
|
||||||
|
nopresentation=18
|
||||||
|
level=4
|
||||||
|
Index: mimetypes/application/x-bittorrent.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/application/x-bittorrent.desktop.orig
|
||||||
|
+++ mimetypes/application/x-bittorrent.desktop
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
+Icon=torrent
|
||||||
|
Comment=BitTorrent Download
|
||||||
|
Comment[af]=BitTorrent Aflaai
|
||||||
|
Comment[ar]=ملف تنزيل BitTorrent
|
||||||
|
Index: mimetypes/application/x-msdos-program.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/application/x-msdos-program.desktop.orig
|
||||||
|
+++ mimetypes/application/x-msdos-program.desktop
|
||||||
|
@@ -85,5 +85,5 @@ MimeType=application/x-msdos-program
|
||||||
|
X-KDE-IsAlso=application/x-executable
|
||||||
|
[Property::X-KDE-NativeExtension]
|
||||||
|
Type=QString
|
||||||
|
-Value=.exe
|
||||||
|
+Value=.exe;.EXE;
|
||||||
|
|
||||||
|
Index: kresources/kresources.desktop
|
||||||
|
===================================================================
|
||||||
|
--- kresources/kresources.desktop.orig
|
||||||
|
+++ kresources/kresources.desktop
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Exec=kcmshell kresources
|
||||||
|
-Icon=date
|
||||||
|
+Icon=about_kde
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
|
@ -0,0 +1,55 @@
|
|||||||
|
Index: kdecore/kstandarddirs.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kstandarddirs.cpp.orig
|
||||||
|
+++ kdecore/kstandarddirs.cpp
|
||||||
|
@@ -100,7 +100,7 @@ static const char* const types[] = {"htm
|
||||||
|
"wallpaper", "lib", "pixmap", "templates",
|
||||||
|
"module", "qtplugins",
|
||||||
|
"xdgdata-apps", "xdgdata-dirs", "xdgconf-menu",
|
||||||
|
- "xdgdata-icon", "xdgdata-pixmap",
|
||||||
|
+ "xdgdata-icon", "xdgdata-pixmap", "xdgconf-autostart",
|
||||||
|
"kcfg", "emoticons", 0 };
|
||||||
|
|
||||||
|
static int tokenize( QStringList& token, const QString& str,
|
||||||
|
@@ -1067,6 +1067,8 @@ QString KStandardDirs::kde_default(const
|
||||||
|
return "desktop-directories/";
|
||||||
|
if (!strcmp(type, "xdgconf-menu"))
|
||||||
|
return "menus/";
|
||||||
|
+ if (!strcmp(type, "xdgconf-autostart"))
|
||||||
|
+ return "autostart/";
|
||||||
|
if (!strcmp(type, "kcfg"))
|
||||||
|
return "share/config.kcfg";
|
||||||
|
if (!strcmp(type, "emoticons"))
|
||||||
|
Index: kinit/autostart.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kinit/autostart.cpp.orig
|
||||||
|
+++ kinit/autostart.cpp
|
||||||
|
@@ -104,7 +104,9 @@ static bool startCondition(const QString
|
||||||
|
void
|
||||||
|
AutoStart::loadAutoStartList()
|
||||||
|
{
|
||||||
|
- QStringList files = KGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
|
||||||
|
+ QStringList files = KGlobal::dirs()->findAllResources("xdgconf-autostart", "*.desktop", false, true);
|
||||||
|
+ QStringList kdefiles = KGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
|
||||||
|
+ files += kdefiles;
|
||||||
|
|
||||||
|
for(QStringList::ConstIterator it = files.begin();
|
||||||
|
it != files.end();
|
||||||
|
@@ -129,6 +131,17 @@ AutoStart::loadAutoStartList()
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (config.hasKey("OnlyShowIn"))
|
||||||
|
+ {
|
||||||
|
+ if (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ if (config.hasKey("NotShowIn"))
|
||||||
|
+ {
|
||||||
|
+ if (config.readListEntry("NotShowIn", ';').contains("KDE"))
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
AutoStartItem *item = new AutoStartItem;
|
||||||
|
item->name = extractName(*it);
|
||||||
|
item->service = *it;
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: dnssd/servicebrowser.cpp
|
||||||
|
===================================================================
|
||||||
|
--- dnssd/servicebrowser.cpp.orig
|
||||||
|
+++ dnssd/servicebrowser.cpp
|
||||||
|
@@ -30,7 +30,7 @@
|
||||||
|
#include <dns_sd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#define MDNSD_PID "/var/run/mdnsd.pid"
|
||||||
|
+#define MDNSD_PID "/var/run/avahi-daemon/pid"
|
||||||
|
|
||||||
|
namespace DNSSD
|
||||||
|
{
|
@ -0,0 +1,3 @@
|
|||||||
|
tdelibs
|
||||||
|
tdelibs-arts
|
||||||
|
tdelibs-default-style
|
@ -0,0 +1,21 @@
|
|||||||
|
------------------------------------------------------------------------
|
||||||
|
r1052100 | mueller | 2009-11-20 19:35:00 +0000 (Fri, 20 Nov 2009) | 2 lines
|
||||||
|
Changed paths:
|
||||||
|
M /branches/KDE/4.3/kdelibs/kjs/dtoa.cpp
|
||||||
|
|
||||||
|
fix array overrun (CVE-2009-0689)
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
Index: dtoa.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kjs/dtoa.cpp (revision 1052099)
|
||||||
|
+++ kjs/dtoa.cpp (revision 1052100)
|
||||||
|
@@ -457,7 +457,7 @@
|
||||||
|
#define FREE_DTOA_LOCK(n) /*nothing*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#define Kmax 15
|
||||||
|
+#define Kmax (sizeof(size_t) << 3)
|
||||||
|
|
||||||
|
struct
|
||||||
|
Bigint {
|
@ -0,0 +1,562 @@
|
|||||||
|
Index: kabc/vcardconverter.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kabc/vcardconverter.cpp.orig
|
||||||
|
+++ kabc/vcardconverter.cpp
|
||||||
|
@@ -51,6 +51,14 @@ QString VCardConverter::createVCard( con
|
||||||
|
return createVCards( list, version );
|
||||||
|
}
|
||||||
|
|
||||||
|
+QCString VCardConverter::createVCardRaw( const Addressee &addr, Version version )
|
||||||
|
+{
|
||||||
|
+ Addressee::List list;
|
||||||
|
+ list.append( addr );
|
||||||
|
+
|
||||||
|
+ return createVCardsRaw( list, version );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
QString VCardConverter::createVCards( Addressee::List list, Version version )
|
||||||
|
{
|
||||||
|
VCardTool tool;
|
||||||
|
@@ -58,6 +66,13 @@ QString VCardConverter::createVCards( Ad
|
||||||
|
return tool.createVCards( list, ( version == v3_0 ? VCard::v3_0 : VCard::v2_1 ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
+QCString VCardConverter::createVCardsRaw( Addressee::List list, Version version )
|
||||||
|
+{
|
||||||
|
+ VCardTool tool;
|
||||||
|
+
|
||||||
|
+ return tool.createVCardsRaw( list, ( version == v3_0 ? VCard::v3_0 : VCard::v2_1 ) );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
Addressee VCardConverter::parseVCard( const QString& vcard )
|
||||||
|
{
|
||||||
|
Addressee::List list = parseVCards( vcard );
|
||||||
|
@@ -65,6 +80,13 @@ Addressee VCardConverter::parseVCard( co
|
||||||
|
return list[ 0 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
+Addressee VCardConverter::parseVCardRaw( const QCString& vcard )
|
||||||
|
+{
|
||||||
|
+ Addressee::List list = parseVCardsRaw( vcard );
|
||||||
|
+
|
||||||
|
+ return list[ 0 ];
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
Addressee::List VCardConverter::parseVCards( const QString& vcard )
|
||||||
|
{
|
||||||
|
VCardTool tool;
|
||||||
|
@@ -72,6 +94,13 @@ Addressee::List VCardConverter::parseVCa
|
||||||
|
return tool.parseVCards( vcard );
|
||||||
|
}
|
||||||
|
|
||||||
|
+Addressee::List VCardConverter::parseVCardsRaw( const QCString& vcard )
|
||||||
|
+{
|
||||||
|
+ VCardTool tool;
|
||||||
|
+
|
||||||
|
+ return tool.parseVCardsRaw( vcard );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
// ---------------------------- deprecated stuff ---------------------------- //
|
||||||
|
|
||||||
|
bool VCardConverter::vCardToAddressee( const QString &str, Addressee &addr, Version version )
|
||||||
|
Index: kabc/vcardconverter.h
|
||||||
|
===================================================================
|
||||||
|
--- kabc/vcardconverter.h.orig
|
||||||
|
+++ kabc/vcardconverter.h
|
||||||
|
@@ -82,6 +82,7 @@ class KABC_EXPORT VCardConverter
|
||||||
|
@param version The version of the generated vCard format
|
||||||
|
*/
|
||||||
|
QString createVCard( const Addressee &addr, Version version = v3_0 );
|
||||||
|
+ QCString createVCardRaw( const Addressee &addr, Version version = v3_0 );
|
||||||
|
|
||||||
|
/**
|
||||||
|
Creates a string in vCard format which contains the given
|
||||||
|
@@ -92,6 +93,7 @@ class KABC_EXPORT VCardConverter
|
||||||
|
*/
|
||||||
|
// FIXME: Add error handling
|
||||||
|
QString createVCards( Addressee::List list, Version version = v3_0 );
|
||||||
|
+ QCString createVCardsRaw( Addressee::List list, Version version = v3_0 );
|
||||||
|
|
||||||
|
// FIXME: Add "createVCards( AddressBook * )"
|
||||||
|
|
||||||
|
@@ -99,12 +101,14 @@ class KABC_EXPORT VCardConverter
|
||||||
|
Parses a string in vCard format and returns the first contact.
|
||||||
|
*/
|
||||||
|
Addressee parseVCard( const QString& vcard );
|
||||||
|
+ Addressee parseVCardRaw( const QCString& vcard );
|
||||||
|
|
||||||
|
/**
|
||||||
|
Parses a string in vCard format and returns a list of contact objects.
|
||||||
|
*/
|
||||||
|
// FIXME: Add error handling
|
||||||
|
Addressee::List parseVCards( const QString& vcard );
|
||||||
|
+ Addressee::List parseVCardsRaw( const QCString& vcard );
|
||||||
|
|
||||||
|
// FIXME: Add "bool parseVCards( AddressBook *, const QString &vcard )"
|
||||||
|
|
||||||
|
Index: kabc/vcardformatplugin.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kabc/vcardformatplugin.cpp.orig
|
||||||
|
+++ kabc/vcardformatplugin.cpp
|
||||||
|
@@ -38,14 +38,11 @@ VCardFormatPlugin::~VCardFormatPlugin()
|
||||||
|
|
||||||
|
bool VCardFormatPlugin::load( Addressee &addressee, QFile *file )
|
||||||
|
{
|
||||||
|
- QString data;
|
||||||
|
-
|
||||||
|
- QTextStream t( file );
|
||||||
|
- t.setEncoding( QTextStream::Latin1 );
|
||||||
|
- data = t.read();
|
||||||
|
+ const QByteArray rawData = file->readAll();
|
||||||
|
+ const QCString data( rawData.data(), rawData.size() );
|
||||||
|
|
||||||
|
VCardConverter converter;
|
||||||
|
- Addressee::List l = converter.parseVCards( data );
|
||||||
|
+ Addressee::List l = converter.parseVCardsRaw( data );
|
||||||
|
|
||||||
|
if ( ! l.first().isEmpty() ) {
|
||||||
|
addressee = l.first();
|
||||||
|
@@ -57,15 +54,11 @@ bool VCardFormatPlugin::load( Addressee
|
||||||
|
|
||||||
|
bool VCardFormatPlugin::loadAll( AddressBook*, Resource *resource, QFile *file )
|
||||||
|
{
|
||||||
|
- QString data;
|
||||||
|
-
|
||||||
|
- QTextStream t( file );
|
||||||
|
- t.setEncoding( QTextStream::Latin1 );
|
||||||
|
- data = t.read();
|
||||||
|
+ const QByteArray rawData = file->readAll();
|
||||||
|
+ const QCString data( rawData.data(), rawData.size() );
|
||||||
|
|
||||||
|
VCardConverter converter;
|
||||||
|
-
|
||||||
|
- Addressee::List l = converter.parseVCards( data );
|
||||||
|
+ Addressee::List l = converter.parseVCardsRaw( data );
|
||||||
|
|
||||||
|
Addressee::List::iterator itr;
|
||||||
|
for ( itr = l.begin(); itr != l.end(); ++itr) {
|
||||||
|
@@ -86,9 +79,8 @@ void VCardFormatPlugin::save( const Addr
|
||||||
|
|
||||||
|
vcardlist.append( addressee );
|
||||||
|
|
||||||
|
- QTextStream t( file );
|
||||||
|
- t.setEncoding( QTextStream::UnicodeUTF8 );
|
||||||
|
- t << converter.createVCards( vcardlist );
|
||||||
|
+ const QCString data = converter.createVCardsRaw( vcardlist );
|
||||||
|
+ file->writeBlock( data, data.length() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void VCardFormatPlugin::saveAll( AddressBook*, Resource *resource, QFile *file )
|
||||||
|
@@ -102,9 +94,8 @@ void VCardFormatPlugin::saveAll( Address
|
||||||
|
vcardlist.append( *it );
|
||||||
|
}
|
||||||
|
|
||||||
|
- QTextStream t( file );
|
||||||
|
- t.setEncoding( QTextStream::UnicodeUTF8 );
|
||||||
|
- t << converter.createVCards( vcardlist );
|
||||||
|
+ const QCString data = converter.createVCardsRaw( vcardlist );
|
||||||
|
+ file->writeBlock( data, data.length() );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool VCardFormatPlugin::checkFormat( QFile *file ) const
|
||||||
|
Index: kabc/vcardparser/vcardparser.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kabc/vcardparser/vcardparser.cpp.orig
|
||||||
|
+++ kabc/vcardparser/vcardparser.cpp
|
||||||
|
@@ -18,10 +18,13 @@
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <qcstring.h>
|
||||||
|
#include <qregexp.h>
|
||||||
|
#include <qtextcodec.h>
|
||||||
|
+#include <qvaluelist.h>
|
||||||
|
|
||||||
|
#include <kmdcodec.h>
|
||||||
|
+#include <kdebug.h>
|
||||||
|
|
||||||
|
#include "vcardparser.h"
|
||||||
|
|
||||||
|
@@ -29,25 +32,60 @@
|
||||||
|
|
||||||
|
using namespace KABC;
|
||||||
|
|
||||||
|
-static QString backslash( "\\\\" );
|
||||||
|
-static QString comma( "\\," );
|
||||||
|
-static QString newline( "\\n" );
|
||||||
|
-static QString cr( "\\r" );
|
||||||
|
+typedef QValueList<QCString> QCStringList;
|
||||||
|
|
||||||
|
-static void addEscapes( QString &str )
|
||||||
|
+QValueList<QCString> splitCString( const QCString &str, char sep )
|
||||||
|
{
|
||||||
|
- str.replace( '\\', backslash );
|
||||||
|
- str.replace( ',', comma );
|
||||||
|
- str.replace( '\r', cr );
|
||||||
|
- str.replace( '\n', newline );
|
||||||
|
+ QValueList<QCString> list;
|
||||||
|
+ int start = 0;
|
||||||
|
+ int end;
|
||||||
|
+ while ((end = str.find(sep, start)) != -1) {
|
||||||
|
+ list.append(str.mid(start, end - start));
|
||||||
|
+ start = end + 1;
|
||||||
|
+ }
|
||||||
|
+ list.append(str.mid(start));
|
||||||
|
+
|
||||||
|
+ return list;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+QValueList<QCString> splitCString( const QCString &str, const QRegExp &exp )
|
||||||
|
+{
|
||||||
|
+ QValueList<QCString> list;
|
||||||
|
+ int start = 0;
|
||||||
|
+ int end;
|
||||||
|
+ while ((end = str.find(exp, start)) != -1) {
|
||||||
|
+ list.append(str.mid(start, end - start));
|
||||||
|
+ start = end + 1;
|
||||||
|
+ }
|
||||||
|
+ list.append(str.mid(start));
|
||||||
|
+
|
||||||
|
+ return list;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool cStringStartsWith( const QCString &str, const QCString &pattern )
|
||||||
|
+{
|
||||||
|
+ const int length = pattern.length();
|
||||||
|
+ if ( length == 0 )
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ const QCString part = str.left( length );
|
||||||
|
+ return (pattern == part);
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void removeEscapes( QString &str )
|
||||||
|
+static void addEscapes( QCString &str )
|
||||||
|
{
|
||||||
|
- str.replace( cr, "\\r" );
|
||||||
|
- str.replace( newline, "\n" );
|
||||||
|
- str.replace( comma, "," );
|
||||||
|
- str.replace( backslash, "\\" );
|
||||||
|
+ str.replace( '\\', "\\\\" );
|
||||||
|
+ str.replace( ',', "\\," );
|
||||||
|
+ str.replace( '\r', "\\r" );
|
||||||
|
+ str.replace( '\n', "\\n" );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void removeEscapes( QCString &str )
|
||||||
|
+{
|
||||||
|
+ str.replace( "\\r", "\r" );
|
||||||
|
+ str.replace( "\\n", "\n" );
|
||||||
|
+ str.replace( "\\,", "," );
|
||||||
|
+ str.replace( "\\\\", "\\" );
|
||||||
|
}
|
||||||
|
|
||||||
|
VCardParser::VCardParser()
|
||||||
|
@@ -60,24 +98,29 @@ VCardParser::~VCardParser()
|
||||||
|
|
||||||
|
VCard::List VCardParser::parseVCards( const QString& text )
|
||||||
|
{
|
||||||
|
+ return parseVCardsRaw( text.utf8() );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+VCard::List VCardParser::parseVCardsRaw( const QCString& text )
|
||||||
|
+{
|
||||||
|
static QRegExp sep( "[\x0d\x0a]" );
|
||||||
|
|
||||||
|
VCard currentVCard;
|
||||||
|
VCard::List vCardList;
|
||||||
|
- QString currentLine;
|
||||||
|
+ QCString currentLine;
|
||||||
|
|
||||||
|
- const QStringList lines = QStringList::split( sep, text );
|
||||||
|
- QStringList::ConstIterator it;
|
||||||
|
+ const QCStringList lines = splitCString( text, sep );
|
||||||
|
+ QCStringList::ConstIterator it;
|
||||||
|
|
||||||
|
bool inVCard = false;
|
||||||
|
- QStringList::ConstIterator linesEnd( lines.end() );
|
||||||
|
+ QCStringList::ConstIterator linesEnd( lines.end() );
|
||||||
|
for ( it = lines.begin(); it != linesEnd; ++it ) {
|
||||||
|
|
||||||
|
if ( (*it).isEmpty() ) // empty line
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( (*it)[ 0 ] == ' ' || (*it)[ 0 ] == '\t' ) { // folded line => append to previous
|
||||||
|
- currentLine += QString( *it ).remove( 0, 1 );
|
||||||
|
+ currentLine.append( (*it).mid( 1 ) );
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
if ( inVCard && !currentLine.isEmpty() ) { // now parse the line
|
||||||
|
@@ -88,23 +131,23 @@ VCard::List VCardParser::parseVCards( co
|
||||||
|
}
|
||||||
|
|
||||||
|
VCardLine vCardLine;
|
||||||
|
- const QString key = currentLine.left( colon ).stripWhiteSpace();
|
||||||
|
- QString value = currentLine.mid( colon + 1 );
|
||||||
|
+ const QCString key = currentLine.left( colon ).stripWhiteSpace();
|
||||||
|
+ QCString value = currentLine.mid( colon + 1 );
|
||||||
|
|
||||||
|
- QStringList params = QStringList::split( ';', key );
|
||||||
|
+ QCStringList params = splitCString( key, ';' );
|
||||||
|
|
||||||
|
// check for group
|
||||||
|
if ( params[0].find( '.' ) != -1 ) {
|
||||||
|
- const QStringList groupList = QStringList::split( '.', params[0] );
|
||||||
|
- vCardLine.setGroup( groupList[0] );
|
||||||
|
- vCardLine.setIdentifier( groupList[1] );
|
||||||
|
+ const QCStringList groupList = splitCString( params[0], '.' );
|
||||||
|
+ vCardLine.setGroup( QString::fromLatin1( groupList[0] ) );
|
||||||
|
+ vCardLine.setIdentifier( QString::fromLatin1( groupList[1] ) );
|
||||||
|
} else
|
||||||
|
- vCardLine.setIdentifier( params[0] );
|
||||||
|
+ vCardLine.setIdentifier( QString::fromLatin1( params[0] ) );
|
||||||
|
|
||||||
|
if ( params.count() > 1 ) { // find all parameters
|
||||||
|
- QStringList::ConstIterator paramIt = params.begin();
|
||||||
|
+ QCStringList::ConstIterator paramIt = params.begin();
|
||||||
|
for ( ++paramIt; paramIt != params.end(); ++paramIt ) {
|
||||||
|
- QStringList pair = QStringList::split( '=', *paramIt );
|
||||||
|
+ QCStringList pair = splitCString( *paramIt, '=' );
|
||||||
|
if ( pair.size() == 1 ) {
|
||||||
|
// correct the fucking 2.1 'standard'
|
||||||
|
if ( pair[0].lower() == "quoted-printable" ) {
|
||||||
|
@@ -119,12 +162,12 @@ VCard::List VCardParser::parseVCards( co
|
||||||
|
}
|
||||||
|
// This is pretty much a faster pair[1].contains( ',' )...
|
||||||
|
if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format
|
||||||
|
- const QStringList args = QStringList::split( ',', pair[ 1 ] );
|
||||||
|
- QStringList::ConstIterator argIt;
|
||||||
|
+ const QCStringList args = splitCString( pair[ 1 ], ',' );
|
||||||
|
+ QCStringList::ConstIterator argIt;
|
||||||
|
for ( argIt = args.begin(); argIt != args.end(); ++argIt )
|
||||||
|
- vCardLine.addParameter( pair[0].lower(), *argIt );
|
||||||
|
+ vCardLine.addParameter( QString::fromLatin1( pair[0].lower() ), QString::fromLatin1( *argIt ) );
|
||||||
|
} else
|
||||||
|
- vCardLine.addParameter( pair[0].lower(), pair[1] );
|
||||||
|
+ vCardLine.addParameter( QString::fromLatin1( pair[0].lower() ), QString::fromLatin1( pair[1] ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -133,10 +176,8 @@ VCard::List VCardParser::parseVCards( co
|
||||||
|
QByteArray output;
|
||||||
|
bool wasBase64Encoded = false;
|
||||||
|
|
||||||
|
- params = vCardLine.parameterList();
|
||||||
|
- if ( params.findIndex( "encoding" ) != -1 ) { // have to decode the data
|
||||||
|
- QByteArray input;
|
||||||
|
- input = QCString(value.latin1());
|
||||||
|
+ if ( vCardLine.parameterList().findIndex( "encoding" ) != -1 ) { // have to decode the data
|
||||||
|
+ QByteArray input = value;
|
||||||
|
if ( vCardLine.parameter( "encoding" ).lower() == "b" ||
|
||||||
|
vCardLine.parameter( "encoding" ).lower() == "base64" ) {
|
||||||
|
KCodecs::base64Decode( input, output );
|
||||||
|
@@ -148,14 +189,14 @@ VCard::List VCardParser::parseVCards( co
|
||||||
|
value = value.remove( value.length() - 1, 1 ) + (*it);
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
- input = QCString(value.latin1());
|
||||||
|
+ input = value;
|
||||||
|
KCodecs::quotedPrintableDecode( input, output );
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
- output = QCString(value.latin1());
|
||||||
|
+ output = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data
|
||||||
|
+ if ( vCardLine.parameterList().findIndex( "charset" ) != -1 ) { // have to convert the data
|
||||||
|
QTextCodec *codec =
|
||||||
|
QTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() );
|
||||||
|
if ( codec ) {
|
||||||
|
@@ -173,17 +214,17 @@ VCard::List VCardParser::parseVCards( co
|
||||||
|
}
|
||||||
|
|
||||||
|
// we do not save the start and end tag as vcardline
|
||||||
|
- if ( (*it).lower().startsWith( "begin:vcard" ) ) {
|
||||||
|
+ if ( cStringStartsWith( (*it).lower(), QCString( "begin:vcard" ) ) ) {
|
||||||
|
inVCard = true;
|
||||||
|
- currentLine.setLength( 0 );
|
||||||
|
+ currentLine = QCString();
|
||||||
|
currentVCard.clear(); // flush vcard
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if ( (*it).lower().startsWith( "end:vcard" ) ) {
|
||||||
|
+ if ( cStringStartsWith( (*it).lower(), QCString( "end:vcard" ) ) ) {
|
||||||
|
inVCard = false;
|
||||||
|
vCardList.append( currentVCard );
|
||||||
|
- currentLine.setLength( 0 );
|
||||||
|
+ currentLine = QCString();
|
||||||
|
currentVCard.clear(); // flush vcard
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
@@ -197,8 +238,13 @@ VCard::List VCardParser::parseVCards( co
|
||||||
|
|
||||||
|
QString VCardParser::createVCards( const VCard::List& list )
|
||||||
|
{
|
||||||
|
- QString text;
|
||||||
|
- QString textLine;
|
||||||
|
+ return QString::fromUtf8( createVCardsRaw( list ) );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+QCString VCardParser::createVCardsRaw( const VCard::List& list )
|
||||||
|
+{
|
||||||
|
+ QCString text;
|
||||||
|
+ QCString textLine;
|
||||||
|
QString encodingType;
|
||||||
|
QStringList idents;
|
||||||
|
QStringList params;
|
||||||
|
@@ -213,7 +259,7 @@ QString VCardParser::createVCards( const
|
||||||
|
|
||||||
|
bool hasEncoding;
|
||||||
|
|
||||||
|
- text.reserve( list.size() * 300 ); // reserve memory to be more efficient
|
||||||
|
+// text.reserve( list.size() * 300 ); // reserve memory to be more efficient
|
||||||
|
|
||||||
|
// iterate over the cards
|
||||||
|
VCard::List::ConstIterator listEnd( list.end() );
|
||||||
|
@@ -228,9 +274,9 @@ QString VCardParser::createVCards( const
|
||||||
|
for ( lineIt = lines.constBegin(); lineIt != lines.constEnd(); ++lineIt ) {
|
||||||
|
if ( !(*lineIt).value().asString().isEmpty() ) {
|
||||||
|
if ( (*lineIt).hasGroup() )
|
||||||
|
- textLine = (*lineIt).group() + "." + (*lineIt).identifier();
|
||||||
|
+ textLine = (*lineIt).group().latin1() + QCString( "." ) + (*lineIt).identifier().latin1();
|
||||||
|
else
|
||||||
|
- textLine = (*lineIt).identifier();
|
||||||
|
+ textLine = (*lineIt).identifier().latin1();
|
||||||
|
|
||||||
|
params = (*lineIt).parameterList();
|
||||||
|
hasEncoding = false;
|
||||||
|
@@ -243,9 +289,9 @@ QString VCardParser::createVCards( const
|
||||||
|
|
||||||
|
values = (*lineIt).parameters( *paramIt );
|
||||||
|
for ( valueIt = values.constBegin(); valueIt != values.constEnd(); ++valueIt ) {
|
||||||
|
- textLine.append( ";" + (*paramIt).upper() );
|
||||||
|
+ textLine.append( QCString( ";" ) + (*paramIt).upper().latin1() );
|
||||||
|
if ( !(*valueIt).isEmpty() )
|
||||||
|
- textLine.append( "=" + (*valueIt) );
|
||||||
|
+ textLine.append( QCString( "=" ) + (*valueIt).latin1() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -261,11 +307,11 @@ QString VCardParser::createVCards( const
|
||||||
|
KCodecs::quotedPrintableEncode( input, output, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
- QString value( output );
|
||||||
|
+ QCString value( output );
|
||||||
|
addEscapes( value );
|
||||||
|
textLine.append( ":" + value );
|
||||||
|
} else {
|
||||||
|
- QString value( (*lineIt).value().asString() );
|
||||||
|
+ QCString value( (*lineIt).value().toString().utf8() );
|
||||||
|
addEscapes( value );
|
||||||
|
textLine.append( ":" + value );
|
||||||
|
}
|
||||||
|
Index: kabc/vcardparser/vcardparser.h
|
||||||
|
===================================================================
|
||||||
|
--- kabc/vcardparser/vcardparser.h.orig
|
||||||
|
+++ kabc/vcardparser/vcardparser.h
|
||||||
|
@@ -34,6 +34,9 @@ class VCardParser
|
||||||
|
static VCard::List parseVCards( const QString& text );
|
||||||
|
static QString createVCards( const VCard::List& list );
|
||||||
|
|
||||||
|
+ static VCard::List parseVCardsRaw( const QCString& text );
|
||||||
|
+ static QCString createVCardsRaw( const VCard::List& list );
|
||||||
|
+
|
||||||
|
private:
|
||||||
|
class VCardParserPrivate;
|
||||||
|
VCardParserPrivate *d;
|
||||||
|
Index: kabc/vcardtool.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kabc/vcardtool.cpp.orig
|
||||||
|
+++ kabc/vcardtool.cpp
|
||||||
|
@@ -74,15 +74,28 @@ VCardTool::~VCardTool()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
-// TODO: make list a const&
|
||||||
|
+QCString VCardTool::createVCardsRaw( Addressee::List list, VCard::Version version )
|
||||||
|
+{
|
||||||
|
+ const VCard::List vCardList = createVCardsInternal( list, version );
|
||||||
|
+
|
||||||
|
+ return VCardParser::createVCardsRaw( vCardList );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
|
||||||
|
{
|
||||||
|
- VCard::List vCardList;
|
||||||
|
+ const VCard::List vCardList = createVCardsInternal( list, version );
|
||||||
|
+
|
||||||
|
+ return VCardParser::createVCards( vCardList );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+KABC::VCard::List VCardTool::createVCardsInternal( Addressee::List list, KABC::VCard::Version version )
|
||||||
|
+{
|
||||||
|
+ KABC::VCard::List vCardList;
|
||||||
|
|
||||||
|
Addressee::List::ConstIterator addrIt;
|
||||||
|
Addressee::List::ConstIterator listEnd( list.constEnd() );
|
||||||
|
for ( addrIt = list.constBegin(); addrIt != listEnd; ++addrIt ) {
|
||||||
|
- VCard card;
|
||||||
|
+ KABC::VCard card;
|
||||||
|
QStringList::ConstIterator strIt;
|
||||||
|
|
||||||
|
// ADR + LABEL
|
||||||
|
@@ -348,17 +361,30 @@ QString VCardTool::createVCards( Address
|
||||||
|
vCardList.append( card );
|
||||||
|
}
|
||||||
|
|
||||||
|
- return VCardParser::createVCards( vCardList );
|
||||||
|
+ return vCardList;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+Addressee::List VCardTool::parseVCardsRaw( const QCString& vcard )
|
||||||
|
+{
|
||||||
|
+ const VCard::List vCardList = VCardParser::parseVCardsRaw( vcard );
|
||||||
|
+
|
||||||
|
+ return parseVCardsInternal( vCardList );
|
||||||
|
}
|
||||||
|
|
||||||
|
Addressee::List VCardTool::parseVCards( const QString& vcard )
|
||||||
|
{
|
||||||
|
+ const VCard::List vCardList = VCardParser::parseVCards( vcard );
|
||||||
|
+
|
||||||
|
+ return parseVCardsInternal( vCardList );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+Addressee::List VCardTool::parseVCardsInternal( const VCard::List &vCardList )
|
||||||
|
+{
|
||||||
|
static const QChar semicolonSep( ';' );
|
||||||
|
static const QChar commaSep( ',' );
|
||||||
|
QString identifier;
|
||||||
|
|
||||||
|
Addressee::List addrList;
|
||||||
|
- const VCard::List vCardList = VCardParser::parseVCards( vcard );
|
||||||
|
|
||||||
|
VCard::List::ConstIterator cardIt;
|
||||||
|
VCard::List::ConstIterator listEnd( vCardList.end() );
|
||||||
|
Index: kabc/vcardtool.h
|
||||||
|
===================================================================
|
||||||
|
--- kabc/vcardtool.h.orig
|
||||||
|
+++ kabc/vcardtool.h
|
||||||
|
@@ -46,12 +46,19 @@ class KABC_EXPORT VCardTool
|
||||||
|
*/
|
||||||
|
QString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 );
|
||||||
|
|
||||||
|
+ QCString createVCardsRaw( Addressee::List list, VCard::Version version = VCard::v3_0 );
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
Parses the string and returns a list of addressee objects.
|
||||||
|
*/
|
||||||
|
Addressee::List parseVCards( const QString& vcard );
|
||||||
|
|
||||||
|
+ Addressee::List parseVCardsRaw( const QCString& vcard );
|
||||||
|
+
|
||||||
|
private:
|
||||||
|
+ VCard::List createVCardsInternal( Addressee::List list, VCard::Version version );
|
||||||
|
+ Addressee::List parseVCardsInternal( const VCard::List &vCardList );
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
Split a string and replaces escaped separators on the fly with
|
||||||
|
unescaped ones.
|
@ -0,0 +1,57 @@
|
|||||||
|
Index: kioslave/ftp/ftp.cc
|
||||||
|
===================================================================
|
||||||
|
--- kioslave/ftp/ftp.cc.orig
|
||||||
|
+++ kioslave/ftp/ftp.cc
|
||||||
|
@@ -1275,6 +1275,16 @@ bool Ftp::ftpRename( const QString & src
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Must check if dst already exists, RNFR+RNTO overwrites by default (#127793).
|
||||||
|
+ if (ftpFileExists(dst)) {
|
||||||
|
+ error(ERR_FILE_ALREADY_EXIST, dst);
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ if (ftpFolder(dst, false)) {
|
||||||
|
+ error(ERR_DIR_ALREADY_EXIST, dst);
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
int pos = src.findRev("/");
|
||||||
|
if( !ftpFolder(src.left(pos+1), false) )
|
||||||
|
return false;
|
||||||
|
@@ -2406,6 +2416,19 @@ bool Ftp::ftpSize( const QString & path,
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool Ftp::ftpFileExists(const QString& path)
|
||||||
|
+{
|
||||||
|
+ QCString buf;
|
||||||
|
+ buf = "SIZE ";
|
||||||
|
+ buf += remoteEncoding()->encode(path);
|
||||||
|
+ if( !ftpSendCmd( buf ) || (m_iRespType != 2) )
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ // skip leading "213 " (response code)
|
||||||
|
+ const char* psz = ftpResponse(4);
|
||||||
|
+ return psz != 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
// Today the differences between ASCII and BINARY are limited to
|
||||||
|
// CR or CR/LF line terminators. Many servers ignore ASCII (like
|
||||||
|
// win2003 -or- vsftp with default config). In the early days of
|
||||||
|
Index: kioslave/ftp/ftp.h
|
||||||
|
===================================================================
|
||||||
|
--- kioslave/ftp/ftp.h.orig
|
||||||
|
+++ kioslave/ftp/ftp.h
|
||||||
|
@@ -350,6 +350,11 @@ private:
|
||||||
|
/**
|
||||||
|
* Set the current working directory, but only if not yet current
|
||||||
|
*/
|
||||||
|
+ bool ftpFileExists(const QString& path);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Set the current working directory, but only if not yet current
|
||||||
|
+ */
|
||||||
|
bool ftpFolder(const QString& path, bool bReportError);
|
||||||
|
|
||||||
|
/**
|
@ -0,0 +1,107 @@
|
|||||||
|
Index: kdecore/kstandarddirs.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kstandarddirs.cpp.orig
|
||||||
|
+++ kdecore/kstandarddirs.cpp
|
||||||
|
@@ -94,8 +94,8 @@ KStandardDirsSingleton* KStandardDirsSin
|
||||||
|
return s_self;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static const char* const types[] = {"html", "icon", "apps", "sound",
|
||||||
|
- "data", "locale", "services", "mime",
|
||||||
|
+static const char* const types[] = {"html", "html-bundle", "icon", "apps", "sound",
|
||||||
|
+ "data", "locale", "locale-bundle", "services", "mime",
|
||||||
|
"servicetypes", "config", "exe",
|
||||||
|
"wallpaper", "lib", "pixmap", "templates",
|
||||||
|
"module", "qtplugins",
|
||||||
|
@@ -1023,6 +1023,8 @@ static int tokenize( QStringList& tokens
|
||||||
|
QString KStandardDirs::kde_default(const char *type) {
|
||||||
|
if (!strcmp(type, "data"))
|
||||||
|
return "share/apps/";
|
||||||
|
+ if (!strcmp(type, "html-bundle"))
|
||||||
|
+ return "share/doc-bundle/HTML/";
|
||||||
|
if (!strcmp(type, "html"))
|
||||||
|
return "share/doc/HTML/";
|
||||||
|
if (!strcmp(type, "icon"))
|
||||||
|
@@ -1035,6 +1037,8 @@ QString KStandardDirs::kde_default(const
|
||||||
|
return "share/applnk/";
|
||||||
|
if (!strcmp(type, "sound"))
|
||||||
|
return "share/sounds/";
|
||||||
|
+ if (!strcmp(type, "locale-bundle"))
|
||||||
|
+ return "share/locale-bundle/";
|
||||||
|
if (!strcmp(type, "locale"))
|
||||||
|
return "share/locale/";
|
||||||
|
if (!strcmp(type, "services"))
|
||||||
|
Index: kdecore/kcatalogue.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kcatalogue.cpp.orig
|
||||||
|
+++ kdecore/kcatalogue.cpp
|
||||||
|
@@ -66,7 +66,11 @@ KCatalogue::KCatalogue(const QString & n
|
||||||
|
.arg( d->language )
|
||||||
|
.arg( d->name );
|
||||||
|
|
||||||
|
- setFileName( locate( "locale", path ) );
|
||||||
|
+ QString fileName = locate( "locale", path );
|
||||||
|
+ if (fileName.isEmpty())
|
||||||
|
+ fileName = locate( "locale-bundle", path );
|
||||||
|
+
|
||||||
|
+ setFileName( fileName );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: kdecore/klocale.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/klocale.cpp.orig
|
||||||
|
+++ kdecore/klocale.cpp
|
||||||
|
@@ -402,7 +402,11 @@ QString KLocale::catalogueFileName(const
|
||||||
|
.arg( language )
|
||||||
|
.arg( catalog.name() );
|
||||||
|
|
||||||
|
- return locate( "locale", path );
|
||||||
|
+ QString fileName = locate( "locale", path );
|
||||||
|
+ if (fileName.isEmpty())
|
||||||
|
+ fileName = locate( "locale-bundle", path );
|
||||||
|
+
|
||||||
|
+ return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KLocale::setLanguage(const QString & language)
|
||||||
|
@@ -501,6 +505,9 @@ bool KLocale::isApplicationTranslatedInt
|
||||||
|
// kdDebug() << "isApplicationTranslatedInto: filename " << sFileName << endl;
|
||||||
|
|
||||||
|
QString sAbsFileName = locate( "locale", sFileName );
|
||||||
|
+ if (sAbsFileName.isEmpty())
|
||||||
|
+ sAbsFileName = locate( "locale-bundle", sFileName );
|
||||||
|
+
|
||||||
|
// kdDebug() << "isApplicationTranslatedInto: absname " << sAbsFileName << endl;
|
||||||
|
return ! sAbsFileName.isEmpty();
|
||||||
|
}
|
||||||
|
Index: kdoctools/kio_help.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdoctools/kio_help.cpp.orig
|
||||||
|
+++ kdoctools/kio_help.cpp
|
||||||
|
@@ -42,7 +42,7 @@ QString HelpProtocol::langLookup(const Q
|
||||||
|
QStringList search;
|
||||||
|
|
||||||
|
// assemble the local search paths
|
||||||
|
- const QStringList localDoc = KGlobal::dirs()->resourceDirs("html");
|
||||||
|
+ const QStringList localDoc = KGlobal::dirs()->resourceDirs("html") + KGlobal::dirs()->resourceDirs("html-bundle");
|
||||||
|
|
||||||
|
kdDebug( 7119 ) << "Looking up help for: " << fname << endl;
|
||||||
|
QString _fname = fname;
|
||||||
|
@@ -60,10 +60,14 @@ QString HelpProtocol::langLookup(const Q
|
||||||
|
QStringList langs = KGlobal::locale()->languageList();
|
||||||
|
QStringList::ConstIterator lang;
|
||||||
|
for (lang = langs.begin(); lang != langs.end(); ++lang)
|
||||||
|
- if ((*lang).left(2) == "en")
|
||||||
|
+ if ((*lang).left(2) == "en") {
|
||||||
|
search.append(QString("/usr/share/gnome/help/%1/C%2").arg(path).arg(_fname));
|
||||||
|
- else
|
||||||
|
+ search.append(QString("/usr/share/gnome/help-bundle/%1/C%2").arg(path).arg(_fname));
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
search.append(QString("/usr/share/gnome/help/%1/%2%3").arg(path).arg(*lang).arg(_fname));
|
||||||
|
+ search.append(QString("/usr/share/gnome/help-bundle/%1/%2%3").arg(path).arg(*lang).arg(_fname));
|
||||||
|
+ }
|
||||||
|
|
||||||
|
langs.append( "en" );
|
||||||
|
langs.remove( "C" );
|
@ -0,0 +1,221 @@
|
|||||||
|
Index: kio/kio/kservice.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kservice.cpp.orig
|
||||||
|
+++ kio/kio/kservice.cpp
|
||||||
|
@@ -725,6 +725,20 @@ QString KService::untranslatedGenericNam
|
||||||
|
return v.isValid() ? v.toString() : QString::null;
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool KService::SuSEunimportant() const {
|
||||||
|
+ QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( "X-SuSE-Unimportant" );
|
||||||
|
+ if ( (it == m_mapProps.end()) || (!it.data().isValid()))
|
||||||
|
+ {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ QString aValue = it.data().toString();
|
||||||
|
+ if (aValue == "true" || aValue == "on" || aValue == "yes")
|
||||||
|
+ return true;
|
||||||
|
+ else
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
QString KService::parentApp() const {
|
||||||
|
QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( "X-KDE-ParentApp" );
|
||||||
|
if ( (it == m_mapProps.end()) || (!it.data().isValid()))
|
||||||
|
Index: kio/kio/kservice.h
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kservice.h.orig
|
||||||
|
+++ kio/kio/kservice.h
|
||||||
|
@@ -327,6 +327,10 @@ public:
|
||||||
|
* @return true to suppress this service
|
||||||
|
*/
|
||||||
|
bool noDisplay() const;
|
||||||
|
+ /**
|
||||||
|
+ * check if the application entry is important
|
||||||
|
+ */
|
||||||
|
+ bool SuSEunimportant() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the application this service belongs to.
|
||||||
|
Index: kio/kio/kservicegroup.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kservicegroup.cpp.orig
|
||||||
|
+++ kio/kio/kservicegroup.cpp
|
||||||
|
@@ -31,8 +31,10 @@
|
||||||
|
class KServiceGroup::Private
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
- Private() { m_bNoDisplay = false; m_bShowEmptyMenu = false;m_bShowInlineHeader=false;m_bInlineAlias=false; m_bAllowInline = false;m_inlineValue = 4;}
|
||||||
|
+ Private() { m_bNoDisplay = false; m_bShowEmptyMenu = false;m_bShowInlineHeader=false;m_bInlineAlias=false; m_bAllowInline = false; m_inlineValue = 4; m_bShortMenu = false; m_bGeneralDescription = false;}
|
||||||
|
bool m_bNoDisplay;
|
||||||
|
+ bool m_bShortMenu;
|
||||||
|
+ bool m_bGeneralDescription;
|
||||||
|
bool m_bShowEmptyMenu;
|
||||||
|
bool m_bShowInlineHeader;
|
||||||
|
bool m_bInlineAlias;
|
||||||
|
@@ -73,6 +75,11 @@ KServiceGroup::KServiceGroup( const QStr
|
||||||
|
m_strComment = config.readEntry( "Comment" );
|
||||||
|
m_bDeleted = config.readBoolEntry( "Hidden", false );
|
||||||
|
d->m_bNoDisplay = config.readBoolEntry( "NoDisplay", false );
|
||||||
|
+ if (d->directoryEntryPath.startsWith(QDir::homeDirPath()))
|
||||||
|
+ d->m_bShortMenu = false;
|
||||||
|
+ else
|
||||||
|
+ d->m_bShortMenu = config.readBoolEntry( "X-SuSE-AutoShortMenu", true );
|
||||||
|
+ d->m_bGeneralDescription = config.readBoolEntry( "X-SuSE-GeneralDescription", false );
|
||||||
|
QStringList tmpList;
|
||||||
|
if (config.hasKey("OnlyShowIn"))
|
||||||
|
{
|
||||||
|
@@ -120,6 +127,10 @@ int KServiceGroup::childCount()
|
||||||
|
{
|
||||||
|
if (m_childCount == -1)
|
||||||
|
{
|
||||||
|
+ KConfig global("kdeglobals");
|
||||||
|
+ global.setGroup("KDE");
|
||||||
|
+ bool showUnimportant = global.readBoolEntry("showUnimportant", false);
|
||||||
|
+
|
||||||
|
m_childCount = 0;
|
||||||
|
|
||||||
|
for( List::ConstIterator it = m_serviceList.begin();
|
||||||
|
@@ -130,7 +141,8 @@ int KServiceGroup::childCount()
|
||||||
|
{
|
||||||
|
KService *service = static_cast<KService *>(p);
|
||||||
|
if (!service->noDisplay())
|
||||||
|
- m_childCount++;
|
||||||
|
+ if ( showUnimportant || !service->SuSEunimportant() )
|
||||||
|
+ m_childCount++;
|
||||||
|
}
|
||||||
|
else if (p->isType(KST_KServiceGroup))
|
||||||
|
{
|
||||||
|
@@ -203,6 +215,16 @@ QStringList KServiceGroup::suppressGener
|
||||||
|
return d->suppressGenericNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool KServiceGroup::SuSEgeneralDescription() const
|
||||||
|
+{
|
||||||
|
+ return d->m_bGeneralDescription;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool KServiceGroup::SuSEshortMenu() const
|
||||||
|
+{
|
||||||
|
+ return d->m_bShortMenu;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void KServiceGroup::load( QDataStream& s )
|
||||||
|
{
|
||||||
|
QStringList groupList;
|
||||||
|
@@ -214,7 +236,8 @@ void KServiceGroup::load( QDataStream& s
|
||||||
|
s >> m_strCaption >> m_strIcon >>
|
||||||
|
m_strComment >> groupList >> m_strBaseGroupName >> m_childCount >>
|
||||||
|
noDisplay >> d->suppressGenericNames >> d->directoryEntryPath >>
|
||||||
|
- d->sortOrder >> _showEmptyMenu >> inlineHeader >> _inlineAlias >> _allowInline;
|
||||||
|
+ d->sortOrder >> _showEmptyMenu >> inlineHeader >> _inlineAlias >>
|
||||||
|
+ _allowInline >> d->m_bShortMenu >> d->m_bGeneralDescription;
|
||||||
|
|
||||||
|
d->m_bNoDisplay = (noDisplay != 0);
|
||||||
|
d->m_bShowEmptyMenu = ( _showEmptyMenu != 0 );
|
||||||
|
@@ -286,7 +309,8 @@ void KServiceGroup::save( QDataStream& s
|
||||||
|
s << m_strCaption << m_strIcon <<
|
||||||
|
m_strComment << groupList << m_strBaseGroupName << m_childCount <<
|
||||||
|
noDisplay << d->suppressGenericNames << d->directoryEntryPath <<
|
||||||
|
- d->sortOrder <<_showEmptyMenu <<inlineHeader<<_inlineAlias<<_allowInline;
|
||||||
|
+ d->sortOrder <<_showEmptyMenu <<inlineHeader<<_inlineAlias<<_allowInline <<
|
||||||
|
+ d->m_bShortMenu << d->m_bGeneralDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
KServiceGroup::List
|
||||||
|
@@ -312,6 +336,12 @@ static void addItem(KServiceGroup::List
|
||||||
|
KServiceGroup::List
|
||||||
|
KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName)
|
||||||
|
{
|
||||||
|
+ return SuSEentries(sort, excludeNoDisplay, allowSeparators, sortByGenericName);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+KServiceGroup::List
|
||||||
|
+KServiceGroup::SuSEentries(bool sort, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName, bool excludeSuSEunimportant)
|
||||||
|
+{
|
||||||
|
KServiceGroup *group = this;
|
||||||
|
|
||||||
|
// If the entries haven't been loaded yet, we have to reload ourselves
|
||||||
|
@@ -338,11 +368,18 @@ KServiceGroup::entries(bool sort, bool e
|
||||||
|
for (List::ConstIterator it(group->m_serviceList.begin()); it != group->m_serviceList.end(); ++it)
|
||||||
|
{
|
||||||
|
KSycocaEntry *p = (*it);
|
||||||
|
+ if( !p->isType(KST_KServiceGroup) && !p->isType(KST_KService))
|
||||||
|
+ continue;
|
||||||
|
bool noDisplay = p->isType(KST_KServiceGroup) ?
|
||||||
|
static_cast<KServiceGroup *>(p)->noDisplay() :
|
||||||
|
static_cast<KService *>(p)->noDisplay();
|
||||||
|
if (excludeNoDisplay && noDisplay)
|
||||||
|
continue;
|
||||||
|
+ bool SuSEunimportant = p->isType(KST_KService) &&
|
||||||
|
+ static_cast<KService *>(p)->SuSEunimportant();
|
||||||
|
+ if (excludeSuSEunimportant && SuSEunimportant)
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
|
// Choose the right list
|
||||||
|
KSortableValueList<SPtr,QCString> & list = p->isType(KST_KServiceGroup) ? glist : slist;
|
||||||
|
QString name;
|
||||||
|
@@ -374,6 +411,15 @@ KServiceGroup::entries(bool sort, bool e
|
||||||
|
}
|
||||||
|
list.insert(key,SPtr(*it));
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ return group->SuSEsortEntries( slist, glist, excludeNoDisplay, allowSeparators );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+KServiceGroup::List
|
||||||
|
+KServiceGroup::SuSEsortEntries( KSortableValueList<SPtr,QCString> slist, KSortableValueList<SPtr,QCString> glist, bool excludeNoDisplay, bool allowSeparators )
|
||||||
|
+{
|
||||||
|
+ KServiceGroup *group = this;
|
||||||
|
+
|
||||||
|
// Now sort
|
||||||
|
slist.sort();
|
||||||
|
glist.sort();
|
||||||
|
@@ -415,6 +461,8 @@ KServiceGroup::entries(bool sort, bool e
|
||||||
|
// TODO: This prevents duplicates
|
||||||
|
for(KSortableValueList<SPtr,QCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
|
||||||
|
{
|
||||||
|
+ if (!(*it2).value()->isType(KST_KService))
|
||||||
|
+ continue;
|
||||||
|
KService *service = (KService *)((KSycocaEntry *)((*it2).value()));
|
||||||
|
if (service->menuId() == item)
|
||||||
|
{
|
||||||
|
Index: kio/kio/kservicegroup.h
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kservicegroup.h.orig
|
||||||
|
+++ kio/kio/kservicegroup.h
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
#include <qvariant.h>
|
||||||
|
|
||||||
|
#include <kdesktopfile.h>
|
||||||
|
+#include <ksortablevaluelist.h>
|
||||||
|
|
||||||
|
#include "ksycocaentry.h"
|
||||||
|
#include "ksycocatype.h"
|
||||||
|
@@ -201,6 +202,12 @@ public:
|
||||||
|
void setLayoutInfo(const QStringList &layout);
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * SuSE special, not part of KDE API
|
||||||
|
+ */
|
||||||
|
+ bool SuSEshortMenu() const;
|
||||||
|
+ bool SuSEgeneralDescription() const;
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
* @internal
|
||||||
|
* Returns information related to the layout of services in this group.
|
||||||
|
*/
|
||||||
|
@@ -238,6 +245,12 @@ public:
|
||||||
|
*/
|
||||||
|
virtual List entries(bool sorted = false);
|
||||||
|
|
||||||
|
+ /*
|
||||||
|
+ * UNOFFICIAL SuSE special
|
||||||
|
+ */
|
||||||
|
+ virtual List SuSEentries(bool sort, bool excludeNoDisplay, bool allowSeparators, bool sortByGenericName, bool excludeSuSEunimportant = true);
|
||||||
|
+ virtual List SuSEsortEntries( KSortableValueList<SPtr,QCString> slist, KSortableValueList<SPtr,QCString> glist, bool excludeNoDisplay, bool allowSeparators );
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Returns a non-empty string if the group is a special base group.
|
||||||
|
* By default, "Settings/" is the kcontrol base group ("settings")
|
@ -0,0 +1,156 @@
|
|||||||
|
export prefix="/opt/kde3"
|
||||||
|
export includedir="$prefix/include"
|
||||||
|
|
||||||
|
export kde_prefix="$prefix"
|
||||||
|
export kde_confdir="$prefix/share/config"
|
||||||
|
|
||||||
|
export kde_bindir="$kde_prefix/bin"
|
||||||
|
export kde_libdir="$kde_prefix/@_lib@"
|
||||||
|
export kde_includes="$kde_prefix/include"
|
||||||
|
export kde_includedir="$kde_prefix/include"
|
||||||
|
|
||||||
|
export kde_htmldir="$kde_prefix/share/doc/HTML"
|
||||||
|
export kde_icondir="$kde_prefix/share/icons"
|
||||||
|
export kde_sounddir="$kde_prefix/share/sounds"
|
||||||
|
export kde_datadir="$kde_prefix/share/apps"
|
||||||
|
export kde_locale="$kde_prefix/share/locale"
|
||||||
|
export kde_mimedir="$kde_prefix/share/mimelnk"
|
||||||
|
export kde_wallpaperdir="$kde_prefix/share/wallpapers"
|
||||||
|
|
||||||
|
export kde_appsdir="$kde_prefix/share/applnk"
|
||||||
|
export kde_servicesdir="$kde_prefix/share/services"
|
||||||
|
export kde_servicetypesdir="$kde_prefix/share/servicetypes"
|
||||||
|
|
||||||
|
export kde_styledir="$kde_libdir/kde3/plugins/styles"
|
||||||
|
export kde_widgetdir="$kde_libdir/kde3/plugins/designer"
|
||||||
|
|
||||||
|
export PATH=$PWD/admin/:$PATH
|
||||||
|
if test -x $PWD/admin/do_make; then
|
||||||
|
alias make=do_make
|
||||||
|
else
|
||||||
|
alias make=/opt/kde3/share/apps/kdelibs/admin/do_make
|
||||||
|
fi
|
||||||
|
|
||||||
|
export configkde="@configkde@"
|
||||||
|
|
||||||
|
unset KDEDIR || :
|
||||||
|
unset KDEDIRS || :
|
||||||
|
unset QTDIR || :
|
||||||
|
|
||||||
|
#export INSTALL_TARGET=install-strip
|
||||||
|
export INSTALL_TARGET=install
|
||||||
|
|
||||||
|
Debug=0
|
||||||
|
if test "$Debug" = 1; then
|
||||||
|
export configkde="$configkde --enable-debug=full"
|
||||||
|
export NO_BRP_STRIP_DEBUG=true
|
||||||
|
else
|
||||||
|
export configkde="$configkde --disable-debug"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS"
|
||||||
|
LDFLAGS=
|
||||||
|
if ld -Bsymbolic-functions -v &> /dev/null; then
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
|
||||||
|
fi
|
||||||
|
export CFLAGS CXXFLAGS LDFLAGS
|
||||||
|
|
||||||
|
update_admin()
|
||||||
|
{
|
||||||
|
set +x
|
||||||
|
if [ ! -d /opt/kde3/share/apps/kdelibs/admin ]; then
|
||||||
|
echo "ERROR: kde2-compat-devel isn't installed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -d admin ]; then
|
||||||
|
echo "WARNING: there is no admin directory."
|
||||||
|
fi
|
||||||
|
rm -rf admin autom4te.cache
|
||||||
|
cp -a /opt/kde3/share/apps/kdelibs/admin .
|
||||||
|
arg=$1
|
||||||
|
# if [ "$arg" != "--no-unsermake" ] && \
|
||||||
|
# [ -f /.buildenv ] && grep -q BUILD_BASENAME=beta- /.buildenv; then
|
||||||
|
# arg="--unsermake"
|
||||||
|
# fi
|
||||||
|
if [ "$arg" = "--no-unsermake" ]; then
|
||||||
|
touch $RPM_BUILD_DIR/.no_unsermake
|
||||||
|
else
|
||||||
|
export UNSERMAKE=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
make -f admin/Makefile.common cvs
|
||||||
|
|
||||||
|
test -f /.buildenv && . /.buildenv
|
||||||
|
|
||||||
|
find . -name \*.ui | while read i; do
|
||||||
|
for j in ${i%.ui}.cpp ${i%.ui}.h ${i%.ui}.moc;do
|
||||||
|
if [ -e "$j" ] && grep -q "by: The User Interface Compiler" "$j"; then
|
||||||
|
echo WARNING: pregenerated files from $i exist, deleting ...
|
||||||
|
rm -f "$j"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "${BUILD_BASENAME:0:4}" != "beta" ]; then
|
||||||
|
if grep -q "<includehints>" "$i"; then
|
||||||
|
echo WARNING: removing include hints from $i
|
||||||
|
sed -i -e 's,<includehint>.*</includehint>,,' "$i"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
kde_post_install()
|
||||||
|
{
|
||||||
|
# remove not needed development files
|
||||||
|
rm -f $RPM_BUILD_ROOT/opt/kde3/@_lib@/libkdeinit_*.la
|
||||||
|
|
||||||
|
# not worth the hassle
|
||||||
|
rm -rf $RPM_BUILD_ROOT/opt/kde3/share/icons/locolor
|
||||||
|
|
||||||
|
# move icons in one theme - prefering hicolor
|
||||||
|
d="$RPM_BUILD_ROOT/opt/kde3/share/icons/crystalsvg"
|
||||||
|
if [ -d "$d" -a ! -e "$d/index.theme" ]; then
|
||||||
|
find "$d" -type f | while read src; do
|
||||||
|
dest="${src/\/crystalsvg\///hicolor/}"
|
||||||
|
dir="${dest%/*}"
|
||||||
|
mkdir -p "$dir"
|
||||||
|
mv "$src" "$dest"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
# we do this 3 times as there is a 3 fold hierarchy
|
||||||
|
if [ -d $RPM_BUILD_ROOT/opt/kde3/share/icons ]; then
|
||||||
|
for i in `seq 1 3`; do
|
||||||
|
find $RPM_BUILD_ROOT/opt/kde3/share/icons -type d -exec rmdir -v --ignore-fail-on-non-empty -- {} \; || true
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $RPM_BUILD_ROOT/opt/kde3/share/locale/sr@Latn ]; then
|
||||||
|
mv $RPM_BUILD_ROOT/opt/kde3/share/locale/sr@Latn $RPM_BUILD_ROOT/opt/kde3/share/locale/sr@latin
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -e /usr/lib/rpm/suse_update_desktop_file.sh; then
|
||||||
|
distribution=''
|
||||||
|
if test -f $HOME/.rpmmacros && test -d /usr/src/packages/SRPMS; then
|
||||||
|
distribution=`grep ^%distribution $HOME/.rpmmacros | cut '-d ' -f2`
|
||||||
|
fi
|
||||||
|
|
||||||
|
find $RPM_BUILD_ROOT/opt/kde3/share \
|
||||||
|
-name '*.desktop' 2> /dev/null | while read file; do
|
||||||
|
test -r "$file" || continue
|
||||||
|
grep -q "^X-SuSE-translate=" "$file" && continue
|
||||||
|
case "$file" in
|
||||||
|
*/.hidden/*)
|
||||||
|
/usr/lib/rpm/suse_update_desktop_file.sh -n "$file"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if test -n "$distribution"; then
|
||||||
|
/usr/lib/rpm/suse_update_desktop_file.sh --project "$distribution" --basedir /usr/src/packages/SRPMS "$file"
|
||||||
|
else
|
||||||
|
/usr/lib/rpm/suse_update_desktop_file.sh "$file"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
After Width: | Height: | Size: 696 B |
@ -0,0 +1,107 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
|
||||||
|
#
|
||||||
|
# Author: Adrian Schroeter <adrian@suse.de>
|
||||||
|
#
|
||||||
|
# This module generates a index.html page for all KDE main api index.html pages
|
||||||
|
# SuSEhelp will use this index.html page as start point
|
||||||
|
|
||||||
|
r=`pwd`
|
||||||
|
while test ! -x usr/share/doc/KDE3-API/ && test "$r" != "/"; do
|
||||||
|
r=`dirname $root`
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
|
||||||
|
kdeapi=/usr/share/doc/KDE3-API/
|
||||||
|
|
||||||
|
if test ! -w $r/${kdeapi} ; then
|
||||||
|
echo "The KDE API directory $kdeapi is not writeable. Exit..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# write html header
|
||||||
|
#
|
||||||
|
cat > $r/${kdeapi}/index.html <<EOF
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||||
|
<meta name="Author" content="kde-maintainers@suse.de">
|
||||||
|
<meta name="GENERATOR" content="create-kdeapi">
|
||||||
|
<title>KDE API Reference</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
|
||||||
|
<CENTER><H1>KDE 3.x API Reference</H1></CENTER>
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
#
|
||||||
|
# list all the api start pages
|
||||||
|
#
|
||||||
|
|
||||||
|
cat >> $r/${kdeapi}/index.html <<EOF
|
||||||
|
<TABLE WIDTH="100%" BORDER="0">
|
||||||
|
<TR bgcolor="b0b0b0">
|
||||||
|
<TH> </TH><TH>Description</TH><TH>from package</TH></TR>
|
||||||
|
<TR bgcolor="ffffff"><TD><A HREF="/usr/share/doc/packages/qt3/html/classes.html">
|
||||||
|
Qt </A></TD> <TD>all Qt classes</TD> <TD>qt</TD></TR>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
dark=1
|
||||||
|
mods=
|
||||||
|
list=`ls -1 $r/${kdeapi}/*/index.html 2> /dev/null`
|
||||||
|
for page in $list; do
|
||||||
|
mainapi=`echo $page | sed -n -e "s@$r/$kdeapi/\([^/]*\)/index.html@\1@p"`
|
||||||
|
mods="$mods $mainapi"
|
||||||
|
eval "page_$mainapi=$page"
|
||||||
|
eval "path_$mainapi=/$kdeapi/$mainapi"
|
||||||
|
done
|
||||||
|
|
||||||
|
list=`ls -1 $r/opt/kde3/share/doc/HTML/en/*-apidocs/*/html/index.html 2> /dev/null`
|
||||||
|
for page in $list; do
|
||||||
|
mainapi=`echo $page | sed -n -e "s@$r/opt/kde3/share/doc/HTML/en/.*-apidocs/\([^/]*\)/html/index.html@\1@p"`
|
||||||
|
mods="$mods $mainapi"
|
||||||
|
path=`echo $page | sed -e "s,$r/opt,/opt,"`
|
||||||
|
eval "page_$mainapi=$path"
|
||||||
|
path=`echo $page | sed -n -e "s@$r\(/opt/kde3/share/doc/HTML/en/.*-apidocs/[^/]*\)/html/index.html@\1@p"`
|
||||||
|
eval "path_$mainapi=$path"
|
||||||
|
done
|
||||||
|
|
||||||
|
mods=`(for i in $mods; do echo $i; done ) | sort`
|
||||||
|
|
||||||
|
for mod in $mods; do
|
||||||
|
eval "apipath=$""page_$mod"
|
||||||
|
eval "basepath=$""path_$mod"
|
||||||
|
description="`cat $r/$basepath/description.SuSE`"
|
||||||
|
package="`cat $r/$basepath/package.SuSE`"
|
||||||
|
|
||||||
|
if [ "$dark" == "1" ]; then
|
||||||
|
dark=0
|
||||||
|
echo "<TR bgcolor=\"eeeeee\">" >> $r/${kdeapi}/index.html
|
||||||
|
else
|
||||||
|
dark=1
|
||||||
|
echo "<TR bgcolor=\"ffffff\">" >> $r/${kdeapi}/index.html
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "<TD><A HREF=\"${apipath}\"> ${mod} </A></TD>" >> $r/${kdeapi}/index.html
|
||||||
|
echo "<TD>${description}</TD>" >> $r/${kdeapi}/index.html
|
||||||
|
echo "<TD>${package}</TD>" >> $r/${kdeapi}/index.html
|
||||||
|
echo "</TR>" >> $r/${kdeapi}/index.html
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
#
|
||||||
|
# finish it ...
|
||||||
|
#
|
||||||
|
cat >> $r/${kdeapi}/index.html <<EOF
|
||||||
|
</TABLE>
|
||||||
|
<hr>
|
||||||
|
<table>
|
||||||
|
<tr><td><small> generated by create-kdeapi on `date` </td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: kio/kio/kprotocolmanager.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kprotocolmanager.cpp.orig
|
||||||
|
+++ kio/kio/kprotocolmanager.cpp
|
||||||
|
@@ -72,7 +72,7 @@ KProtocolManagerPrivate::~KProtocolManag
|
||||||
|
|
||||||
|
// DEFAULT USERAGENT STRING
|
||||||
|
#define CFG_DEFAULT_UAGENT(X) \
|
||||||
|
-QString("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) KHTML/%4.%5.%6 (like Gecko)") \
|
||||||
|
+QString("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) KHTML/%4.%5.%6 (like Gecko) SUSE") \
|
||||||
|
.arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(X).arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(KDE_VERSION_RELEASE)
|
||||||
|
|
||||||
|
void KProtocolManager::reparseConfiguration()
|
@ -0,0 +1,209 @@
|
|||||||
|
Index: kdecore/kconfigbase.h
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kconfigbase.h.orig
|
||||||
|
+++ kdecore/kconfigbase.h
|
||||||
|
@@ -1985,6 +1985,7 @@ public:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QCString readEntryUtf8( const char *pKey) const;
|
||||||
|
+ bool hasTranslatedKey( const char *pKey ) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The currently selected group. */
|
||||||
|
Index: kdecore/kconfigbase.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kconfigbase.cpp.orig
|
||||||
|
+++ kdecore/kconfigbase.cpp
|
||||||
|
@@ -131,6 +131,24 @@ bool KConfigBase::hasKey(const char *pKe
|
||||||
|
return !entry.mValue.isNull();
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool KConfigBase::hasTranslatedKey(const char* pKey) const
|
||||||
|
+{
|
||||||
|
+ KEntryKey aEntryKey(mGroup, 0);
|
||||||
|
+ aEntryKey.c_key = pKey;
|
||||||
|
+ aEntryKey.bDefault = readDefaults();
|
||||||
|
+
|
||||||
|
+ if (!locale().isNull()) {
|
||||||
|
+ // try the localized key first
|
||||||
|
+ aEntryKey.bLocal = true;
|
||||||
|
+ KEntry entry = lookupData(aEntryKey);
|
||||||
|
+ if (!entry.mValue.isNull())
|
||||||
|
+ return true;
|
||||||
|
+ aEntryKey.bLocal = false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool KConfigBase::hasGroup(const QString &group) const
|
||||||
|
{
|
||||||
|
return internalHasGroup( group.utf8());
|
||||||
|
Index: kdecore/kdesktopfile.h
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kdesktopfile.h.orig
|
||||||
|
+++ kdecore/kdesktopfile.h
|
||||||
|
@@ -236,6 +236,8 @@ private:
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
+ QString translatedEntry(const char*) const;
|
||||||
|
+
|
||||||
|
// copy-construction and assignment are not allowed
|
||||||
|
KDesktopFile( const KDesktopFile& );
|
||||||
|
KDesktopFile& operator= ( const KDesktopFile& );
|
||||||
|
Index: kdecore/kdesktopfile.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kdesktopfile.cpp.orig
|
||||||
|
+++ kdecore/kdesktopfile.cpp
|
||||||
|
@@ -34,6 +34,8 @@
|
||||||
|
#include "kapplication.h"
|
||||||
|
#include "kstandarddirs.h"
|
||||||
|
#include "kmountpoint.h"
|
||||||
|
+#include "kcatalogue.h"
|
||||||
|
+#include "klocale.h"
|
||||||
|
|
||||||
|
#include "kdesktopfile.h"
|
||||||
|
#include "kdesktopfile.moc"
|
||||||
|
@@ -145,6 +147,27 @@ bool KDesktopFile::isAuthorizedDesktopFi
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
+QString KDesktopFile::translatedEntry(const char* key) const
|
||||||
|
+{
|
||||||
|
+ if (hasTranslatedKey(key))
|
||||||
|
+ return readEntry(key);
|
||||||
|
+
|
||||||
|
+ if (hasKey(key)) {
|
||||||
|
+ QString value = readEntryUntranslated(key);
|
||||||
|
+ QString fName = fileName();
|
||||||
|
+ fName = fName.mid(fName.findRev('/')+1);
|
||||||
|
+ QString po_lookup_key = QString::fromLatin1(key) + "(" + fName + "): " + value;
|
||||||
|
+ QString po_value = KGlobal::locale()->translate(po_lookup_key.utf8().data());
|
||||||
|
+
|
||||||
|
+ if (po_value == po_lookup_key)
|
||||||
|
+ return value;
|
||||||
|
+
|
||||||
|
+ return po_value;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return QString::null;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
QString KDesktopFile::readType() const
|
||||||
|
{
|
||||||
|
return readEntry("Type");
|
||||||
|
@@ -157,17 +180,17 @@ QString KDesktopFile::readIcon() const
|
||||||
|
|
||||||
|
QString KDesktopFile::readName() const
|
||||||
|
{
|
||||||
|
- return readEntry("Name");
|
||||||
|
+ return translatedEntry("Name");
|
||||||
|
}
|
||||||
|
|
||||||
|
QString KDesktopFile::readComment() const
|
||||||
|
{
|
||||||
|
- return readEntry("Comment");
|
||||||
|
+ return translatedEntry("Comment");
|
||||||
|
}
|
||||||
|
|
||||||
|
QString KDesktopFile::readGenericName() const
|
||||||
|
{
|
||||||
|
- return readEntry("GenericName");
|
||||||
|
+ return translatedEntry("GenericName");
|
||||||
|
}
|
||||||
|
|
||||||
|
QString KDesktopFile::readPath() const
|
||||||
|
@@ -342,5 +365,3 @@ KDesktopFile* KDesktopFile::copyTo(const
|
||||||
|
config->setDesktopGroup();
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
-
|
||||||
|
Index: kio/kio/kservice.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kservice.cpp.orig
|
||||||
|
+++ kio/kio/kservice.cpp
|
||||||
|
@@ -114,7 +114,7 @@ KService::init( KDesktopFile *config )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- m_strName = config->readEntry( "Name" );
|
||||||
|
+ m_strName = config->readName();
|
||||||
|
entryMap.remove("Name");
|
||||||
|
if ( m_strName.isEmpty() )
|
||||||
|
{
|
||||||
|
@@ -134,7 +134,7 @@ KService::init( KDesktopFile *config )
|
||||||
|
m_strName = m_strName.left(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
- m_strType = config->readEntry( "Type" );
|
||||||
|
+ m_strType = config->readType();
|
||||||
|
entryMap.remove("Type");
|
||||||
|
if ( m_strType.isEmpty() )
|
||||||
|
{
|
||||||
|
@@ -204,11 +204,11 @@ KService::init( KDesktopFile *config )
|
||||||
|
entryMap.remove("Terminal");
|
||||||
|
m_strTerminalOptions = config->readEntry( "TerminalOptions" ); // should be a property IMHO
|
||||||
|
entryMap.remove("TerminalOptions");
|
||||||
|
- m_strPath = config->readPathEntry( "Path" );
|
||||||
|
+ m_strPath = config->readPath();
|
||||||
|
entryMap.remove("Path");
|
||||||
|
- m_strComment = config->readEntry( "Comment" );
|
||||||
|
+ m_strComment = config->readComment();
|
||||||
|
entryMap.remove("Comment");
|
||||||
|
- m_strGenName = config->readEntry( "GenericName" );
|
||||||
|
+ m_strGenName = config->readGenericName();
|
||||||
|
entryMap.remove("GenericName");
|
||||||
|
QString untranslatedGenericName = config->readEntryUntranslated( "GenericName" );
|
||||||
|
if (!untranslatedGenericName.isEmpty())
|
||||||
|
Index: kio/kio/kservicegroup.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kservicegroup.cpp.orig
|
||||||
|
+++ kio/kio/kservicegroup.cpp
|
||||||
|
@@ -66,13 +66,11 @@ KServiceGroup::KServiceGroup( const QStr
|
||||||
|
|
||||||
|
d->directoryEntryPath = cfg;
|
||||||
|
|
||||||
|
- KConfig config( cfg, true, false, "apps" );
|
||||||
|
+ KDesktopFile config( cfg, true, "apps" );
|
||||||
|
|
||||||
|
- config.setDesktopGroup();
|
||||||
|
-
|
||||||
|
- m_strCaption = config.readEntry( "Name" );
|
||||||
|
- m_strIcon = config.readEntry( "Icon" );
|
||||||
|
- m_strComment = config.readEntry( "Comment" );
|
||||||
|
+ m_strCaption = config.readName();
|
||||||
|
+ m_strIcon = config.readIcon();
|
||||||
|
+ m_strComment = config.readComment();
|
||||||
|
m_bDeleted = config.readBoolEntry( "Hidden", false );
|
||||||
|
d->m_bNoDisplay = config.readBoolEntry( "NoDisplay", false );
|
||||||
|
if (d->directoryEntryPath.startsWith(QDir::homeDirPath()))
|
||||||
|
Index: kio/kio/kmimetype.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kmimetype.cpp.orig
|
||||||
|
+++ kio/kio/kmimetype.cpp
|
||||||
|
@@ -677,9 +677,8 @@ QString KFolderType::comment( const KURL
|
||||||
|
KURL u( _url );
|
||||||
|
u.addPath( ".directory" );
|
||||||
|
|
||||||
|
- KSimpleConfig cfg( u.path(), true );
|
||||||
|
- cfg.setDesktopGroup();
|
||||||
|
- QString comment = cfg.readEntry( "Comment" );
|
||||||
|
+ KDesktopFile cfg( u.path(), true );
|
||||||
|
+ QString comment = cfg.readComment();
|
||||||
|
if ( comment.isEmpty() )
|
||||||
|
return KMimeType::comment( _url, _is_local );
|
||||||
|
|
||||||
|
@@ -772,9 +771,8 @@ QString KDEDesktopMimeType::comment( con
|
||||||
|
if ( !_is_local )
|
||||||
|
return KMimeType::comment( _url, _is_local );
|
||||||
|
|
||||||
|
- KSimpleConfig cfg( _url.path(), true );
|
||||||
|
- cfg.setDesktopGroup();
|
||||||
|
- QString comment = cfg.readEntry( "Comment" );
|
||||||
|
+ KDesktopFile cfg( _url.path(), true );
|
||||||
|
+ QString comment = cfg.readComment();
|
||||||
|
if ( comment.isEmpty() )
|
||||||
|
return KMimeType::comment( _url, _is_local );
|
||||||
|
|
@ -0,0 +1,34 @@
|
|||||||
|
Index: kdecore/network/kresolver.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/network/kresolver.cpp.orig
|
||||||
|
+++ kdecore/network/kresolver.cpp
|
||||||
|
@@ -50,6 +50,7 @@
|
||||||
|
|
||||||
|
// IDN
|
||||||
|
#ifdef HAVE_IDNA_H
|
||||||
|
+# include <stdlib.h>
|
||||||
|
# include <idna.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -1084,6 +1085,10 @@ static QStringList splitLabels(const QSt
|
||||||
|
static QCString ToASCII(const QString& label)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_IDNA_H
|
||||||
|
+ // We do disable it by default for security reasons for now.
|
||||||
|
+ if ( getenv("KDE_NO_IPV6") && strcmp( getenv("KDE_NO_IPV6"), "no" ) )
|
||||||
|
+ return label.latin1();
|
||||||
|
+
|
||||||
|
// We have idna.h, so we can use the idna_to_ascii
|
||||||
|
// function :)
|
||||||
|
|
||||||
|
@@ -1118,6 +1123,10 @@ static QCString ToASCII(const QString& l
|
||||||
|
static QString ToUnicode(const QString& label)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_IDNA_H
|
||||||
|
+ // We do disable it by default for security reasons for now.
|
||||||
|
+ if ( getenv("KDE_NO_IPV6") && strcmp( getenv("KDE_NO_IPV6"), "no" ) )
|
||||||
|
+ return label;
|
||||||
|
+
|
||||||
|
// We have idna.h, so we can use the idna_to_unicode
|
||||||
|
// function :)
|
||||||
|
|
@ -0,0 +1,66 @@
|
|||||||
|
Index: kio/kio/kfileshare.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kfileshare.cpp.orig
|
||||||
|
+++ kio/kio/kfileshare.cpp
|
||||||
|
@@ -291,4 +291,24 @@ bool KFileShare::setShared( const QStrin
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool KFileShare::sambaActive()
|
||||||
|
+{
|
||||||
|
+ // rcsmb is not executable by users, try ourselves
|
||||||
|
+ int status = system( "/sbin/checkproc -p /var/run/samba/smbd.pid /usr/sbin/smbd" );
|
||||||
|
+ return status != -1 && WIFEXITED( status ) && WEXITSTATUS( status ) == 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool KFileShare::nfsActive()
|
||||||
|
+{
|
||||||
|
+ // rcnfsserver is not executable by users, try ourselves
|
||||||
|
+ int status = system( "/sbin/checkproc /usr/sbin/rpc.mountd" );
|
||||||
|
+ if( status != -1 && WIFEXITED( status ) && WEXITSTATUS( status ) == 0 )
|
||||||
|
+ {
|
||||||
|
+ status = system( "/sbin/checkproc -n nfsd" );
|
||||||
|
+ if( status != -1 && WIFEXITED( status ) && WEXITSTATUS( status ) == 0 )
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#include "kfileshare.moc"
|
||||||
|
Index: kio/kio/kfileshare.h
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kfileshare.h.orig
|
||||||
|
+++ kio/kio/kfileshare.h
|
||||||
|
@@ -131,6 +131,18 @@ public:
|
||||||
|
* Returns whether NFS is enabled
|
||||||
|
*/
|
||||||
|
static bool nfsEnabled();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns whether Samba is active (service is running)
|
||||||
|
+ * @internal
|
||||||
|
+ */
|
||||||
|
+ static bool sambaActive();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns whether NFS is active (service is running)
|
||||||
|
+ * @internal
|
||||||
|
+ */
|
||||||
|
+ static bool nfsActive();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static Authorization s_authorization;
|
||||||
|
Index: kio/kfile/kfilesharedlg.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kfile/kfilesharedlg.cpp.orig
|
||||||
|
+++ kio/kfile/kfilesharedlg.cpp
|
||||||
|
@@ -167,6 +167,9 @@ void KFileSharePropsPlugin::init()
|
||||||
|
vbox->addWidget( m_pbConfig, 0, Qt::AlignHCenter );
|
||||||
|
|
||||||
|
vbox->addStretch( 10 );
|
||||||
|
+
|
||||||
|
+ if( !KFileShare::sambaActive() && !KFileShare::nfsActive())
|
||||||
|
+ m_widget->setEnabled( false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
@ -0,0 +1,96 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# this is a script around make which basicly checks
|
||||||
|
# if it's in srcdir or in builddir and changes to
|
||||||
|
# the right directory for calling /usr/bin/make
|
||||||
|
# (C) Stephan Kulow
|
||||||
|
|
||||||
|
# You may need to set OBJ_REPLACEMENT variable to get it to work.
|
||||||
|
# In the variable use the sed syntax to switch directories, for example
|
||||||
|
# export OBJ_REPLACEMENT="s:/home/zack/cvs/kde:/home/zack/build:"
|
||||||
|
# will assure that the builds are performed under /home/zack/build
|
||||||
|
# directory, when the cvs is held under /home/zack/cvs/kde.
|
||||||
|
|
||||||
|
file=Makefile
|
||||||
|
dir=.
|
||||||
|
args=()
|
||||||
|
jobs=
|
||||||
|
|
||||||
|
while test $# -gt 0 ; do
|
||||||
|
case "${1}" in
|
||||||
|
-f)
|
||||||
|
shift
|
||||||
|
file="${1}"
|
||||||
|
shift
|
||||||
|
args=("${args[@]}" -f $file)
|
||||||
|
;;
|
||||||
|
-C)
|
||||||
|
shift
|
||||||
|
dir="${1}"
|
||||||
|
shift ;;
|
||||||
|
-j)
|
||||||
|
shift
|
||||||
|
jobs="${1}"
|
||||||
|
shift ;;
|
||||||
|
-j*)
|
||||||
|
jobs="${1/-j/}"
|
||||||
|
shift ;;
|
||||||
|
*)
|
||||||
|
args=("${args[@]}" "$1")
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test ! -f $dir/$file; then
|
||||||
|
if test -n "$OBJ_SUBDIR"; then
|
||||||
|
dir=$PWD
|
||||||
|
subdir=.
|
||||||
|
while test ! -f $dir/$OBJ_SUBDIR/$file; do
|
||||||
|
subdir=`basename $dir`"/$subdir"
|
||||||
|
dir=`dirname $dir`
|
||||||
|
if test "$dir" = "/"; then
|
||||||
|
# the case that someone puts the compile dir in /
|
||||||
|
# is very unlikely, so we better skip here ;)
|
||||||
|
echo "can't find $OBJ_SUBDIR above current dir"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd $dir/$OBJ_SUBDIR/$subdir
|
||||||
|
else
|
||||||
|
if test -n "$OBJ_REPLACEMENT"; then
|
||||||
|
pwd=`echo $PWD | sed -e "$OBJ_REPLACEMENT"`
|
||||||
|
if test ! -f $pwd/$dir/$file; then
|
||||||
|
echo "no objdir found. Tried $pwd"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd $pwd/$dir
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cd $dir
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "makeobj[0]: Entering directory \`$PWD'"
|
||||||
|
if test -z "$MAKE"; then
|
||||||
|
if head -n 1 $file | grep unsermake >/dev/null; then
|
||||||
|
MAKE=`type -p unsermake`
|
||||||
|
if test ! -x "$MAKE"; then
|
||||||
|
echo 'Makefile was created with unsermake, but there'
|
||||||
|
echo 'is no unsermake in $PATH'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
MAKE="$MAKE --no-real-compare VERBOSE=1"
|
||||||
|
if test -n "$jobs"; then args=("${args[@]}" --compile-jobs=$jobs); fi
|
||||||
|
else
|
||||||
|
MAKE=/usr/bin/make
|
||||||
|
if test -n "$jobs"; then args=("${args[@]}" -j $jobs); fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Calling $MAKE ${args[@]}"
|
||||||
|
LANGUAGE=C $MAKE "${args[@]}"
|
||||||
|
retval=$?
|
||||||
|
echo "makeobj[0]: Leaving directory \`$PWD'"
|
||||||
|
exit $retval
|
||||||
|
|
@ -0,0 +1,296 @@
|
|||||||
|
--- kio/kfile/kfilesharedlg.cpp
|
||||||
|
+++ kio/kfile/kfilesharedlg.cpp 2004/08/06 08:38:31
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
#include <qradiobutton.h>
|
||||||
|
#include <qbuttongroup.h>
|
||||||
|
#include <qlayout.h>
|
||||||
|
+#include <qlineedit.h>
|
||||||
|
#include <kprocess.h>
|
||||||
|
#include <kprocio.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
@@ -93,8 +94,10 @@
|
||||||
|
delete m_widget;
|
||||||
|
m_rbShare = 0L;
|
||||||
|
m_rbUnShare = 0L;
|
||||||
|
+ m_rbSharerw = 0L;
|
||||||
|
m_widget = new QWidget( d->m_vBox );
|
||||||
|
QVBoxLayout * vbox = new QVBoxLayout( m_widget );
|
||||||
|
+ //QHBoxLayout * hbox = new QHBoxLayout( vbox );
|
||||||
|
|
||||||
|
switch ( KFileShare::authorization() ) {
|
||||||
|
case KFileShare::Authorized:
|
||||||
|
@@ -105,18 +108,31 @@
|
||||||
|
home += '/';
|
||||||
|
bool ok = true;
|
||||||
|
KFileItemList items = properties->items();
|
||||||
|
- // We have 3 possibilities: all shared, all unshared, or mixed.
|
||||||
|
+ // We have some possibilities: all shared, all unshared (ro,rw), or mixed.
|
||||||
|
bool allShared = true;
|
||||||
|
bool allUnshared = true;
|
||||||
|
+ bool allreadonly = true;
|
||||||
|
KFileItemListIterator it( items );
|
||||||
|
for ( ; it.current() && ok; ++it ) {
|
||||||
|
QString path = (*it)->url().path();
|
||||||
|
+
|
||||||
|
+ // 0 => not shared
|
||||||
|
+ // 1 => shared read only
|
||||||
|
+ // 3 => shared writeable
|
||||||
|
+ int dirStatus = KFileShare::isDirectoryShared( path );
|
||||||
|
if ( !path.startsWith( home ) )
|
||||||
|
ok = false;
|
||||||
|
- if ( KFileShare::isDirectoryShared( path ) )
|
||||||
|
+ if ( dirStatus == 1 ) {
|
||||||
|
allUnshared = false;
|
||||||
|
- else
|
||||||
|
+ }
|
||||||
|
+ else if ( dirStatus == 3 ) {
|
||||||
|
+ allUnshared = false;
|
||||||
|
+ allreadonly = false;
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
allShared = false;
|
||||||
|
+ allreadonly = false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
if ( !ok )
|
||||||
|
{
|
||||||
|
@@ -136,16 +152,31 @@
|
||||||
|
vbox->addWidget( m_rbUnShare, 0 );
|
||||||
|
rbGroup->insert( m_rbUnShare );
|
||||||
|
|
||||||
|
- m_rbShare = new QRadioButton( i18n("Shared"), m_widget );
|
||||||
|
+ m_rbShare = new QRadioButton( i18n("Shared - read only for others"), m_widget );
|
||||||
|
connect( m_rbShare, SIGNAL( toggled(bool) ), SIGNAL( changed() ) );
|
||||||
|
vbox->addWidget( m_rbShare, 0 );
|
||||||
|
rbGroup->insert( m_rbShare );
|
||||||
|
|
||||||
|
+ m_rbSharerw = new QRadioButton( i18n("Shared - writeable for others"), m_widget );
|
||||||
|
+ connect( m_rbSharerw, SIGNAL( toggled(bool) ), SIGNAL( changed() ) );
|
||||||
|
+ vbox->addWidget( m_rbSharerw, 0 );
|
||||||
|
+ rbGroup->insert( m_rbSharerw );
|
||||||
|
+
|
||||||
|
+ //QLabel *testlabel1 = new QLabel(i18n("Enter Samba Share Name here"),m_widget);
|
||||||
|
+ //m_leSmbShareName = new QLineEdit(m_widget);
|
||||||
|
+ //m_leSmbShareName->setMaxLength(12);
|
||||||
|
+
|
||||||
|
+ //hbox->addWidget( testlabel1, 0 );
|
||||||
|
+ //hbox->addWidget( m_leSmbShareName );
|
||||||
|
+ //vbox->addLayout( hbox );
|
||||||
|
+
|
||||||
|
// Activate depending on status
|
||||||
|
if ( allShared )
|
||||||
|
- m_rbShare->setChecked(true);
|
||||||
|
+ m_rbSharerw->setChecked(true);
|
||||||
|
if ( allUnshared )
|
||||||
|
m_rbUnShare->setChecked(true);
|
||||||
|
+ if ( allreadonly )
|
||||||
|
+ m_rbShare->setChecked(true);
|
||||||
|
|
||||||
|
// Some help text
|
||||||
|
QLabel *label = new QLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget );
|
||||||
|
@@ -204,7 +235,7 @@
|
||||||
|
void KFileSharePropsPlugin::applyChanges()
|
||||||
|
{
|
||||||
|
kdDebug() << "KFileSharePropsPlugin::applyChanges" << endl;
|
||||||
|
- if ( m_rbShare && m_rbUnShare )
|
||||||
|
+ if ( m_rbShare && m_rbUnShare && m_rbSharerw )
|
||||||
|
{
|
||||||
|
bool share = m_rbShare->isChecked();
|
||||||
|
KFileItemList items = properties->items();
|
||||||
|
@@ -212,7 +243,7 @@
|
||||||
|
bool ok = true;
|
||||||
|
for ( ; it.current() && ok; ++it ) {
|
||||||
|
QString path = (*it)->url().path();
|
||||||
|
- ok = setShared( path, share );
|
||||||
|
+ ok = SuSEsetShared( path, share, m_rbSharerw->isChecked() );
|
||||||
|
if (!ok) {
|
||||||
|
if (share)
|
||||||
|
KMessageBox::detailedError(properties,
|
||||||
|
@@ -239,8 +270,14 @@
|
||||||
|
|
||||||
|
bool KFileSharePropsPlugin::setShared( const QString& path, bool shared )
|
||||||
|
{
|
||||||
|
- kdDebug() << "KFileSharePropsPlugin::setShared " << path << "," << shared << endl;
|
||||||
|
- return KFileShare::setShared( path, shared );
|
||||||
|
+ return SuSEsetShared( path, shared, true );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool KFileSharePropsPlugin::SuSEsetShared( const QString& path, bool shared, bool readonly )
|
||||||
|
+{
|
||||||
|
+ kdDebug() << "KFileSharePropsPlugin::setShared " << path << ","
|
||||||
|
+ << shared << readonly << endl;
|
||||||
|
+ return KFileShare::SuSEsetShared( path, shared, readonly );
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget* KFileSharePropsPlugin::page() const
|
||||||
|
--- kio/kfile/kfilesharedlg.h
|
||||||
|
+++ kio/kfile/kfilesharedlg.h 2004/08/06 08:38:31
|
||||||
|
@@ -54,10 +54,13 @@
|
||||||
|
private:
|
||||||
|
void init();
|
||||||
|
bool setShared( const QString&path, bool shared );
|
||||||
|
+ bool SuSEsetShared( const QString&path, bool shared, bool readonly );
|
||||||
|
|
||||||
|
QWidget *m_widget;
|
||||||
|
QRadioButton *m_rbShare;
|
||||||
|
+ QRadioButton *m_rbSharerw;
|
||||||
|
QRadioButton *m_rbUnShare;
|
||||||
|
+ //QLineEdit *m_leSmbShareName;
|
||||||
|
QPushButton *m_pbConfig;
|
||||||
|
class Private;
|
||||||
|
Private *d;
|
||||||
|
--- kio/kio/kfileshare.cpp
|
||||||
|
+++ kio/kio/kfileshare.cpp 2004/08/06 08:38:51
|
||||||
|
@@ -20,6 +20,7 @@
|
||||||
|
#include "kfileshare.h"
|
||||||
|
#include <qdir.h>
|
||||||
|
#include <qfile.h>
|
||||||
|
+#include <qregexp.h>
|
||||||
|
#include <kprocess.h>
|
||||||
|
#include <kprocio.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
@@ -35,8 +36,10 @@
|
||||||
|
#include <kuser.h>
|
||||||
|
|
||||||
|
KFileShare::Authorization KFileShare::s_authorization = NotInitialized;
|
||||||
|
-QStringList* KFileShare::s_shareList = 0L;
|
||||||
|
-static KStaticDeleter<QStringList> sdShareList;
|
||||||
|
+//QStringList* KFileShare::s_shareList = 0L;
|
||||||
|
+//static KStaticDeleter<QStringList> sdShareList;
|
||||||
|
+QMap<QString,QString>* KFileShare::s_shareMap = 0L;
|
||||||
|
+static KStaticDeleter<QMap<QString,QString> > sdShareMap;
|
||||||
|
|
||||||
|
KFileShare::ShareMode KFileShare::s_shareMode;
|
||||||
|
bool KFileShare::s_sambaEnabled;
|
||||||
|
@@ -164,10 +167,10 @@
|
||||||
|
void KFileShare::readShareList()
|
||||||
|
{
|
||||||
|
KFileSharePrivate::self();
|
||||||
|
- if ( !s_shareList )
|
||||||
|
- sdShareList.setObject( s_shareList, new QStringList );
|
||||||
|
+ if ( !s_shareMap )
|
||||||
|
+ sdShareMap.setObject( s_shareMap, new QMap<QString,QString> );
|
||||||
|
else
|
||||||
|
- s_shareList->clear();
|
||||||
|
+ s_shareMap->clear();
|
||||||
|
|
||||||
|
// /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
|
||||||
|
QString exe = findExe( "filesharelist" );
|
||||||
|
@@ -185,29 +188,45 @@
|
||||||
|
|
||||||
|
// Reading code shamelessly stolen from khostname.cpp ;)
|
||||||
|
QString line;
|
||||||
|
+ QString options;
|
||||||
|
+ QString path;
|
||||||
|
int length;
|
||||||
|
+ QRegExp rx_line("([^\\s]+)\\s+(.*)");
|
||||||
|
do {
|
||||||
|
length = proc.readln(line, true);
|
||||||
|
if ( length > 0 )
|
||||||
|
{
|
||||||
|
if ( line[length-1] != '/' )
|
||||||
|
line += '/';
|
||||||
|
- s_shareList->append(line);
|
||||||
|
+ if( rx_line.search( line ) != -1 ) {
|
||||||
|
+ options = rx_line.cap(1);
|
||||||
|
+ path = rx_line.cap(2);
|
||||||
|
+ (*s_shareMap)[path] = options;
|
||||||
|
+ }
|
||||||
|
kdDebug(7000) << "Shared dir:" << line << endl;
|
||||||
|
}
|
||||||
|
} while (length > -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-bool KFileShare::isDirectoryShared( const QString& _path )
|
||||||
|
+int KFileShare::isDirectoryShared( const QString& _path )
|
||||||
|
{
|
||||||
|
- if ( ! s_shareList )
|
||||||
|
+ int ret(0);
|
||||||
|
+
|
||||||
|
+ if ( ! s_shareMap )
|
||||||
|
readShareList();
|
||||||
|
|
||||||
|
QString path( _path );
|
||||||
|
if ( path[path.length()-1] != '/' )
|
||||||
|
path += '/';
|
||||||
|
- return s_shareList && s_shareList->contains( path );
|
||||||
|
+ //return s_shareList && s_shareList->contains( path );
|
||||||
|
+ if( (*s_shareMap).contains(path) && !((*s_shareMap)[path].isEmpty()) ) {
|
||||||
|
+ ret+=1;
|
||||||
|
+ if( (*s_shareMap)[path].find("readwrite") != -1 )
|
||||||
|
+ ret+=2;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
KFileShare::Authorization KFileShare::authorization()
|
||||||
|
@@ -230,17 +249,30 @@
|
||||||
|
|
||||||
|
bool KFileShare::setShared( const QString& path, bool shared )
|
||||||
|
{
|
||||||
|
+ return SuSEsetShared( path, shared, false );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool KFileShare::SuSEsetShared( const QString& path, bool shared, bool rw )
|
||||||
|
+{
|
||||||
|
if (! KFileShare::sharingEnabled() ||
|
||||||
|
KFileShare::shareMode() == Advanced)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
- kdDebug(7000) << "KFileShare::setShared " << path << "," << shared << endl;
|
||||||
|
QString exe = KFileShare::findExe( "fileshareset" );
|
||||||
|
if (exe.isEmpty())
|
||||||
|
return false;
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+ // we want to share, so we kick it first - just to be sure
|
||||||
|
KProcess proc;
|
||||||
|
proc << exe;
|
||||||
|
+ proc << "--remove";
|
||||||
|
+ proc << path;
|
||||||
|
+ proc.start( KProcess::Block );
|
||||||
|
+ proc.clearArguments();
|
||||||
|
+
|
||||||
|
+ proc << exe;
|
||||||
|
+ if( rw )
|
||||||
|
+ proc << "--rw";
|
||||||
|
if ( shared )
|
||||||
|
proc << "--add";
|
||||||
|
else
|
||||||
|
--- kio/kio/kfileshare.h
|
||||||
|
+++ kio/kio/kfileshare.h 2004/08/06 08:38:31
|
||||||
|
@@ -65,7 +65,7 @@
|
||||||
|
/**
|
||||||
|
* Call this to know if a directory is currently shared
|
||||||
|
*/
|
||||||
|
- static bool isDirectoryShared( const QString& path );
|
||||||
|
+ static int isDirectoryShared( const QString& path );
|
||||||
|
|
||||||
|
enum Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed };
|
||||||
|
/**
|
||||||
|
@@ -83,7 +83,12 @@
|
||||||
|
* @returns wether the perl script was successful
|
||||||
|
*/
|
||||||
|
static bool setShared( const QString& path, bool shared );
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * SuSE only enhancement for now
|
||||||
|
+ */
|
||||||
|
+ static bool SuSEsetShared( const QString& path, bool shared, bool ro );
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* The used share mode.
|
||||||
|
* Simple means that the simple sharing dialog is used and
|
||||||
|
@@ -132,7 +137,8 @@
|
||||||
|
|
||||||
|
private:
|
||||||
|
static Authorization s_authorization;
|
||||||
|
- static QStringList* s_shareList;
|
||||||
|
+// static QStringList* s_shareList;
|
||||||
|
+ static QMap<QString,QString>* s_shareMap;
|
||||||
|
static ShareMode s_shareMode;
|
||||||
|
static bool s_sambaEnabled;
|
||||||
|
static bool s_nfsEnabled;
|
@ -0,0 +1,16 @@
|
|||||||
|
Index: dcop/dcopidlng/dcopidlng
|
||||||
|
===================================================================
|
||||||
|
--- dcop/dcopidlng/dcopidlng.orig
|
||||||
|
+++ dcop/dcopidlng/dcopidlng
|
||||||
|
@@ -5,7 +5,11 @@ trap "rm -f dcopidlng.stderr.$$" 0 1 2 1
|
||||||
|
if test -z "$KDECONFIG"; then
|
||||||
|
KDECONFIG=kde-config
|
||||||
|
fi
|
||||||
|
+if type kde-config > /dev/null; then
|
||||||
|
LIBDIR="`$KDECONFIG --install data --expandvars`/dcopidlng"
|
||||||
|
+else
|
||||||
|
+LIBDIR="${0%/*}"
|
||||||
|
+fi
|
||||||
|
perl -I"$LIBDIR" "$LIBDIR/kalyptus" --allow_k_dcop_accessors -f dcopidl $1 2> dcopidlng.stderr.$$
|
||||||
|
RET=$?
|
||||||
|
if [ $RET -ne 0 ]
|
@ -0,0 +1,130 @@
|
|||||||
|
Index: kdoctools/kio_help.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdoctools/kio_help.cpp.orig
|
||||||
|
+++ kdoctools/kio_help.cpp
|
||||||
|
@@ -44,7 +44,27 @@ QString HelpProtocol::langLookup(const Q
|
||||||
|
// assemble the local search paths
|
||||||
|
const QStringList localDoc = KGlobal::dirs()->resourceDirs("html");
|
||||||
|
|
||||||
|
+ kdDebug( 7119 ) << "Looking up help for: " << fname << endl;
|
||||||
|
+ QString _fname = fname;
|
||||||
|
+
|
||||||
|
+ QString path;
|
||||||
|
+ int slash = _fname.findRev ('/');
|
||||||
|
+ if (slash == -1 || slash == 0) {
|
||||||
|
+ path = _fname;
|
||||||
|
+ _fname = "";
|
||||||
|
+ } else {
|
||||||
|
+ path = _fname.left (slash);
|
||||||
|
+ _fname = _fname.right (_fname.length() - slash);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
QStringList langs = KGlobal::locale()->languageList();
|
||||||
|
+ QStringList::ConstIterator lang;
|
||||||
|
+ for (lang = langs.begin(); lang != langs.end(); ++lang)
|
||||||
|
+ if ((*lang).left(2) == "en")
|
||||||
|
+ search.append(QString("/usr/share/gnome/help/%1/C%2").arg(path).arg(_fname));
|
||||||
|
+ else
|
||||||
|
+ search.append(QString("/usr/share/gnome/help/%1/%2%3").arg(path).arg(*lang).arg(_fname));
|
||||||
|
+
|
||||||
|
langs.append( "en" );
|
||||||
|
langs.remove( "C" );
|
||||||
|
|
||||||
|
@@ -60,7 +80,7 @@ QString HelpProtocol::langLookup(const Q
|
||||||
|
{
|
||||||
|
QStringList::ConstIterator lang;
|
||||||
|
for (lang = langs.begin(); lang != langs.end(); ++lang)
|
||||||
|
- search.append(QString("%1%2/%3").arg(localDoc[id], *lang, fname));
|
||||||
|
+ search.append(QString("%1%2/%3").arg(localDoc[id], *lang, path + _fname));
|
||||||
|
}
|
||||||
|
|
||||||
|
// try to locate the file
|
||||||
|
@@ -81,6 +101,15 @@ QString HelpProtocol::langLookup(const Q
|
||||||
|
if (info.exists() && info.isFile() && info.isReadable())
|
||||||
|
return *it;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if ( ( *it ).right( 5 ) == ".html" )
|
||||||
|
+ {
|
||||||
|
+ QString file = (*it).left((*it).findRev('/')) + "/" + path + ".xml";
|
||||||
|
+ kdDebug( 7119 ) << "Looking for help in: " << file << endl;
|
||||||
|
+ info.setFile(file);
|
||||||
|
+ if (info.exists() && info.isFile() && info.isReadable())
|
||||||
|
+ return *it;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -100,7 +129,7 @@ QString HelpProtocol::lookupFile(const Q
|
||||||
|
result = langLookup(path);
|
||||||
|
if (result.isEmpty())
|
||||||
|
{
|
||||||
|
- result = langLookup(path+"/index.html");
|
||||||
|
+ result = langLookup(path + "/index.html");
|
||||||
|
if (!result.isEmpty())
|
||||||
|
{
|
||||||
|
KURL red( "help:/" );
|
||||||
|
@@ -190,12 +219,26 @@ void HelpProtocol::get( const KURL& url
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QString docbook_file = file.left(file.findRev('/')) + "/index.docbook";
|
||||||
|
+ int last_slash = file.findRev('/');
|
||||||
|
+ if (last_slash != -1 && last_slash != 0) {
|
||||||
|
+ int slash2 = file.findRev('/', last_slash -1);
|
||||||
|
+ if (slash2 != -1 && slash2 != 0) {
|
||||||
|
+ int slash3 = file.findRev('/', slash2 - 1);
|
||||||
|
+ if (slash3 != -1) {
|
||||||
|
+ QString xml_file = file.left(file.findRev('/')) + "/" + file.mid(slash3 + 1, slash2 - (slash3 + 1)) + ".xml";
|
||||||
|
+ kdDebug( 7119 ) << "xml_file " << xml_file << endl;
|
||||||
|
+ QFileInfo fi(xml_file);
|
||||||
|
+ if (fi.exists())
|
||||||
|
+ docbook_file = xml_file;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
if (!KStandardDirs::exists(file)) {
|
||||||
|
file = docbook_file;
|
||||||
|
} else {
|
||||||
|
QFileInfo fi(file);
|
||||||
|
if (fi.isDir()) {
|
||||||
|
- file = file + "/index.docbook";
|
||||||
|
+ file = docbook_file;
|
||||||
|
} else {
|
||||||
|
if ( file.right( 5 ) != ".html" || !compareTimeStamps( file, docbook_file ) ) {
|
||||||
|
get_file( target );
|
||||||
|
@@ -238,7 +281,11 @@ void HelpProtocol::get( const KURL& url
|
||||||
|
mParsed = transform(file, locate("dtd", "customization/kde-chunk.xsl"));
|
||||||
|
if ( !mParsed.isEmpty() ) {
|
||||||
|
infoMessage( i18n( "Saving to cache" ) );
|
||||||
|
- QString cache = file.left( file.length() - 7 );
|
||||||
|
+ QString cache;
|
||||||
|
+ if (file.endsWith(".xml"))
|
||||||
|
+ cache = file.left( file.length() - strlen ("xml") );
|
||||||
|
+ else
|
||||||
|
+ cache = file.left( file.length() - strlen ("docbook") );
|
||||||
|
saveToCache( mParsed, locateLocal( "cache",
|
||||||
|
"kio_help" + cache +
|
||||||
|
"cache.bz2" ) );
|
||||||
|
Index: kdoctools/xslt.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdoctools/xslt.cpp.orig
|
||||||
|
+++ kdoctools/xslt.cpp
|
||||||
|
@@ -278,10 +278,16 @@ static bool readCache( const QString &fi
|
||||||
|
QString lookForCache( const QString &filename )
|
||||||
|
{
|
||||||
|
kdDebug() << "lookForCache " << filename << endl;
|
||||||
|
- assert( filename.endsWith( ".docbook" ) );
|
||||||
|
+ assert( filename.endsWith( ".docbook" ) || filename.endsWith( ".xml" ) );
|
||||||
|
assert( filename.at( 0 ) == '/' );
|
||||||
|
|
||||||
|
- QString cache = filename.left( filename.length() - 7 );
|
||||||
|
+ QString cache;
|
||||||
|
+
|
||||||
|
+ if (filename.endsWith( ".xml" ))
|
||||||
|
+ cache = filename.left( filename.length() - strlen ("xml") );
|
||||||
|
+ else
|
||||||
|
+ cache = filename.left( filename.length() - strlen ("docbook") );
|
||||||
|
+
|
||||||
|
QString output;
|
||||||
|
if ( readCache( filename, cache + "cache.bz2", output) )
|
||||||
|
return output;
|
@ -0,0 +1,126 @@
|
|||||||
|
--- kdoctools/kio_help.cpp
|
||||||
|
+++ kdoctools/kio_help.cpp
|
||||||
|
@@ -44,7 +44,27 @@
|
||||||
|
// assemble the local search paths
|
||||||
|
const QStringList localDoc = KGlobal::dirs()->resourceDirs("html");
|
||||||
|
|
||||||
|
+ kdDebug( 7119 ) << "Looking up help for: " << fname << endl;
|
||||||
|
+ QString _fname = fname;
|
||||||
|
+
|
||||||
|
+ QString path;
|
||||||
|
+ int slash = _fname.findRev ('/');
|
||||||
|
+ if (slash == -1 || slash == 0) {
|
||||||
|
+ path = _fname;
|
||||||
|
+ _fname = "";
|
||||||
|
+ } else {
|
||||||
|
+ path = _fname.left (slash);
|
||||||
|
+ _fname = _fname.right (_fname.length() - slash);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
QStringList langs = KGlobal::locale()->languageList();
|
||||||
|
+ QStringList::ConstIterator lang;
|
||||||
|
+ for (lang = langs.begin(); lang != langs.end(); ++lang)
|
||||||
|
+ if ((*lang).left(2) == "en")
|
||||||
|
+ search.append(QString("/opt/gnome/share/gnome/help/%1/C%2").arg(path).arg(_fname));
|
||||||
|
+ else
|
||||||
|
+ search.append(QString("/opt/gnome/share/gnome/help/%1/%2%3").arg(path).arg(*lang).arg(_fname));
|
||||||
|
+
|
||||||
|
langs.append( "en" );
|
||||||
|
langs.remove( "C" );
|
||||||
|
|
||||||
|
@@ -60,7 +80,7 @@
|
||||||
|
{
|
||||||
|
QStringList::ConstIterator lang;
|
||||||
|
for (lang = langs.begin(); lang != langs.end(); ++lang)
|
||||||
|
- search.append(QString("%1%2/%3").arg(localDoc[id], *lang, fname));
|
||||||
|
+ search.append(QString("%1%2/%3").arg(localDoc[id], *lang, path + _fname));
|
||||||
|
}
|
||||||
|
|
||||||
|
// try to locate the file
|
||||||
|
@@ -81,6 +101,15 @@
|
||||||
|
if (info.exists() && info.isFile() && info.isReadable())
|
||||||
|
return *it;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if ( ( *it ).right( 5 ) == ".html" )
|
||||||
|
+ {
|
||||||
|
+ QString file = (*it).left((*it).findRev('/')) + "/" + path + ".xml";
|
||||||
|
+ kdDebug( 7119 ) << "Looking for help in: " << file << endl;
|
||||||
|
+ info.setFile(file);
|
||||||
|
+ if (info.exists() && info.isFile() && info.isReadable())
|
||||||
|
+ return *it;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -100,7 +129,7 @@
|
||||||
|
result = langLookup(path);
|
||||||
|
if (result.isEmpty())
|
||||||
|
{
|
||||||
|
- result = langLookup(path+"/index.html");
|
||||||
|
+ result = langLookup(path + "/index.html");
|
||||||
|
if (!result.isEmpty())
|
||||||
|
{
|
||||||
|
KURL red( "help:/" );
|
||||||
|
@@ -190,12 +219,26 @@
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QString docbook_file = file.left(file.findRev('/')) + "/index.docbook";
|
||||||
|
+ int last_slash = file.findRev('/');
|
||||||
|
+ if (last_slash != -1 && last_slash != 0) {
|
||||||
|
+ int slash2 = file.findRev('/', last_slash -1);
|
||||||
|
+ if (slash2 != -1 && slash2 != 0) {
|
||||||
|
+ int slash3 = file.findRev('/', slash2 - 1);
|
||||||
|
+ if (slash3 != -1) {
|
||||||
|
+ QString xml_file = file.left(file.findRev('/')) + "/" + file.mid(slash3 + 1, slash2 - (slash3 + 1)) + ".xml";
|
||||||
|
+ kdDebug( 7119 ) << "xml_file " << xml_file << endl;
|
||||||
|
+ QFileInfo fi(xml_file);
|
||||||
|
+ if (fi.exists())
|
||||||
|
+ docbook_file = xml_file;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
if (!KStandardDirs::exists(file)) {
|
||||||
|
file = docbook_file;
|
||||||
|
} else {
|
||||||
|
QFileInfo fi(file);
|
||||||
|
if (fi.isDir()) {
|
||||||
|
- file = file + "/index.docbook";
|
||||||
|
+ file = docbook_file;
|
||||||
|
} else {
|
||||||
|
if ( file.right( 5 ) != ".html" || !compareTimeStamps( file, docbook_file ) ) {
|
||||||
|
get_file( target );
|
||||||
|
@@ -238,7 +281,11 @@
|
||||||
|
mParsed = transform(file, locate("dtd", "customization/kde-chunk.xsl"));
|
||||||
|
if ( !mParsed.isEmpty() ) {
|
||||||
|
infoMessage( i18n( "Saving to cache" ) );
|
||||||
|
- QString cache = file.left( file.length() - 7 );
|
||||||
|
+ QString cache;
|
||||||
|
+ if (file.endsWith(".xml"))
|
||||||
|
+ cache = file.left( file.length() - strlen ("xml") );
|
||||||
|
+ else
|
||||||
|
+ cache = file.left( file.length() - strlen ("docbook") );
|
||||||
|
saveToCache( mParsed, locateLocal( "cache",
|
||||||
|
"kio_help" + cache +
|
||||||
|
"cache.bz2" ) );
|
||||||
|
--- kdoctools/xslt.cpp
|
||||||
|
+++ kdoctools/xslt.cpp
|
||||||
|
@@ -274,10 +274,16 @@
|
||||||
|
QString lookForCache( const QString &filename )
|
||||||
|
{
|
||||||
|
kdDebug() << "lookForCache " << filename << endl;
|
||||||
|
- assert( filename.endsWith( ".docbook" ) );
|
||||||
|
+ assert( filename.endsWith( ".docbook" ) || filename.endsWith( ".xml" ) );
|
||||||
|
assert( filename.at( 0 ) == '/' );
|
||||||
|
|
||||||
|
- QString cache = filename.left( filename.length() - 7 );
|
||||||
|
+ QString cache;
|
||||||
|
+
|
||||||
|
+ if (filename.endsWith( ".xml" ))
|
||||||
|
+ cache = filename.left( filename.length() - strlen ("xml") );
|
||||||
|
+ else
|
||||||
|
+ cache = filename.left( filename.length() - strlen ("docbook") );
|
||||||
|
+
|
||||||
|
QString output;
|
||||||
|
if ( readCache( filename, cache + "cache.bz2", output) )
|
||||||
|
return output;
|
@ -0,0 +1,88 @@
|
|||||||
|
Index: kdemm/backend.h
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/backend.h.orig
|
||||||
|
+++ kdemm/backend.h
|
||||||
|
@@ -41,7 +41,7 @@ namespace Multimedia
|
||||||
|
* \author Matthias Kretz <kretz@kde.org>
|
||||||
|
* \since 4.0
|
||||||
|
*/
|
||||||
|
- class Backend : public QObject
|
||||||
|
+ class KDE_EXPORT Backend : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
Index: kdemm/channel.h
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/channel.h.orig
|
||||||
|
+++ kdemm/channel.h
|
||||||
|
@@ -34,7 +34,7 @@ namespace Multimedia
|
||||||
|
* \author Matthias Kretz <kretz@kde.org>
|
||||||
|
* \since 4.0
|
||||||
|
*/
|
||||||
|
- class Channel : public QObject, virtual public MixerIface
|
||||||
|
+ class KDE_EXPORT Channel : public QObject, virtual public MixerIface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
Index: kdemm/factory.h
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/factory.h.orig
|
||||||
|
+++ kdemm/factory.h
|
||||||
|
@@ -64,7 +64,7 @@ class VideoPlayer;
|
||||||
|
* \author Matthias Kretz <kretz@kde.org>
|
||||||
|
* \since 4.0
|
||||||
|
*/
|
||||||
|
-class Factory : public QObject, public DCOPObject
|
||||||
|
+class KDE_EXPORT Factory : public QObject, public DCOPObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
Index: kdemm/player.h
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/player.h.orig
|
||||||
|
+++ kdemm/player.h
|
||||||
|
@@ -20,6 +20,7 @@
|
||||||
|
#ifndef PLAYOBJECT_H
|
||||||
|
#define PLAYOBJECT_H
|
||||||
|
|
||||||
|
+#include <kdelibs_export.h>
|
||||||
|
#include <qobject.h>
|
||||||
|
|
||||||
|
class KURL;
|
||||||
|
@@ -35,7 +36,7 @@ namespace Multimedia
|
||||||
|
* \author Matthias Kretz <kretz@kde.org>
|
||||||
|
* \since 4.0
|
||||||
|
*/
|
||||||
|
- class Player : public QObject
|
||||||
|
+ class KDE_EXPORT Player : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
Index: kdemm/simpleplayer.h
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/simpleplayer.h.orig
|
||||||
|
+++ kdemm/simpleplayer.h
|
||||||
|
@@ -32,7 +32,7 @@ namespace KDE
|
||||||
|
namespace Multimedia
|
||||||
|
{
|
||||||
|
|
||||||
|
-class SimplePlayer : public QObject
|
||||||
|
+class KDE_EXPORT SimplePlayer : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
Index: kdemm/mixeriface.h
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/mixeriface.h.orig
|
||||||
|
+++ kdemm/mixeriface.h
|
||||||
|
@@ -21,8 +21,9 @@
|
||||||
|
#define MIXERIFACE_H
|
||||||
|
|
||||||
|
#include <dcopobject.h>
|
||||||
|
+#include <kdelibs_export.h>
|
||||||
|
|
||||||
|
-class MixerIface : public DCOPObject
|
||||||
|
+class KDE_EXPORT MixerIface : public DCOPObject
|
||||||
|
{
|
||||||
|
K_DCOP
|
||||||
|
k_dcop:
|
@ -0,0 +1,37 @@
|
|||||||
|
Index: kdeprint/management/smbview.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeprint/management/smbview.cpp.orig
|
||||||
|
+++ kdeprint/management/smbview.cpp
|
||||||
|
@@ -187,13 +187,26 @@ void SmbView::setOpen(QListViewItem *ite
|
||||||
|
}
|
||||||
|
else if (item->depth() == 1)
|
||||||
|
{ // opening server
|
||||||
|
+ char *krb5ccname = getenv ("KRB5CCNAME");
|
||||||
|
m_current = item;
|
||||||
|
- *m_proc << "smbclient -N -L ";
|
||||||
|
- *m_proc << KProcess::quote(item->text(0));
|
||||||
|
- *m_proc << " -W ";
|
||||||
|
- *m_proc << KProcess::quote(item->parent()->text(0));
|
||||||
|
- *m_proc << " -A ";
|
||||||
|
- *m_proc << KProcess::quote(m_passwdFile->name());
|
||||||
|
+ if (krb5ccname)
|
||||||
|
+ {
|
||||||
|
+ *m_proc << "smbclient -k -N -L ";
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ *m_proc << "smbclient -N -L ";
|
||||||
|
+ }
|
||||||
|
+ *m_proc << KProcess::quote (item->text (0));
|
||||||
|
+ *m_proc << " -W ";
|
||||||
|
+ *m_proc << KProcess::quote (item->parent ()->
|
||||||
|
+ text (0));
|
||||||
|
+ if (!krb5ccname)
|
||||||
|
+ {
|
||||||
|
+ *m_proc << " -A ";
|
||||||
|
+ *m_proc << KProcess::
|
||||||
|
+ quote (m_passwdFile->name ());
|
||||||
|
+ }
|
||||||
|
startProcess(ShareListing);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
--- kdeui/kmenubar.cpp.sav 2008-03-08 17:32:38.000000000 +0100
|
||||||
|
+++ kdeui/kmenubar.cpp 2009-08-30 09:27:29.000000000 +0200
|
||||||
|
@@ -308,7 +308,7 @@ void KMenuBar::updateFallbackSize()
|
||||||
|
if( d->fallback_mode )
|
||||||
|
{
|
||||||
|
d->fallback_mode = false;
|
||||||
|
-// KWin::setStrut( winId(), 0, 0, 0, 0 ); KWin will set strut as it will see fit
|
||||||
|
+ KWin::setStrut( winId(), 0, 0, 0, 0 );
|
||||||
|
setMinimumSize( 0, 0 );
|
||||||
|
setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
|
||||||
|
updateMenuBarSize();
|
@ -0,0 +1,80 @@
|
|||||||
|
Index: kdeui/qxembed.h
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/qxembed.h.orig
|
||||||
|
+++ kdeui/qxembed.h
|
||||||
|
@@ -191,6 +191,11 @@ public:
|
||||||
|
void enterWhatsThisMode(); // temporary, fix in Qt (Matthias, Mon Jul 17 15:20:55 CEST 2000 )
|
||||||
|
virtual void reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt = false );
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * @internal
|
||||||
|
+ */
|
||||||
|
+ void updateEmbeddedFocus( bool hasfocus );
|
||||||
|
+
|
||||||
|
signals:
|
||||||
|
/**
|
||||||
|
* This signal is emitted when the embedded window has been lost (destroyed or reparented away)
|
||||||
|
Index: kdeui/qxembed.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/qxembed.cpp.orig
|
||||||
|
+++ kdeui/qxembed.cpp
|
||||||
|
@@ -314,8 +314,8 @@ bool QXEmbedAppFilter::eventFilter( QObj
|
||||||
|
if ( qApp->focusWidget() == o &&
|
||||||
|
((QPublicWidget*)qApp->focusWidget()->topLevelWidget())->topData()->embedded ) {
|
||||||
|
QFocusEvent* fe = (QFocusEvent*) e;
|
||||||
|
- if ( obeyFocus || fe->reason() == QFocusEvent::Mouse ||
|
||||||
|
- fe->reason() == QFocusEvent::Shortcut ) {
|
||||||
|
+ if ( obeyFocus || fe->reason() != QFocusEvent::ActiveWindow /*|| fe->reason() == QFocusEvent::Mouse ||
|
||||||
|
+ fe->reason() == QFocusEvent::Shortcut*/ ) {
|
||||||
|
// L0614: A widget in the embedded client was just given the Qt focus.
|
||||||
|
// Variable `obeyFocus' suggests that this is the result of mouse
|
||||||
|
// activity in the client. The XEMBED_REQUEST_FOCUS message causes
|
||||||
|
@@ -478,8 +478,11 @@ static int qxembed_x11_event_filter( XEv
|
||||||
|
switch ( detail ) {
|
||||||
|
case XEMBED_FOCUS_CURRENT:
|
||||||
|
// L0683: Set focus on saved focus widget
|
||||||
|
- if ( focusCurrent )
|
||||||
|
+ if ( focusCurrent ) {
|
||||||
|
focusCurrent->setFocus();
|
||||||
|
+ if( QXEmbed* emb = dynamic_cast< QXEmbed* >( focusCurrent ))
|
||||||
|
+ emb->updateEmbeddedFocus( true );
|
||||||
|
+ }
|
||||||
|
else if ( !w->topLevelWidget()->focusWidget() )
|
||||||
|
w->topLevelWidget()->setFocus();
|
||||||
|
break;
|
||||||
|
@@ -511,6 +514,8 @@ static int qxembed_x11_event_filter( XEv
|
||||||
|
// We first record what the focus widget was
|
||||||
|
// and clear the Qt focus.
|
||||||
|
if ( w->topLevelWidget()->focusWidget() ) {
|
||||||
|
+ if( QXEmbed* emb = dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget()))
|
||||||
|
+ emb->updateEmbeddedFocus( false );
|
||||||
|
focusMap->insert( w->topLevelWidget(),
|
||||||
|
new QGuardedPtr<QWidget>(w->topLevelWidget()->focusWidget() ) );
|
||||||
|
w->topLevelWidget()->focusWidget()->clearFocus();
|
||||||
|
@@ -919,6 +924,17 @@ void QXEmbed::focusOutEvent( QFocusEvent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+// When QXEmbed has Qt focus and gets/loses X focus, make sure the client knows
|
||||||
|
+// about the state of the focus.
|
||||||
|
+void QXEmbed::updateEmbeddedFocus( bool hasfocus ){
|
||||||
|
+ if (!window || d->xplain)
|
||||||
|
+ return;
|
||||||
|
+ if( hasfocus )
|
||||||
|
+ sendXEmbedMessage( window, XEMBED_FOCUS_IN, XEMBED_FOCUS_CURRENT);
|
||||||
|
+ else
|
||||||
|
+ sendXEmbedMessage( window, XEMBED_FOCUS_OUT);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
// L1600: Helper for QXEmbed::embed()
|
||||||
|
// Check whether a window is in withdrawn state.
|
||||||
|
static bool wstate_withdrawn( WId winid )
|
||||||
|
@@ -1161,6 +1177,8 @@ bool QXEmbed::x11Event( XEvent* e)
|
||||||
|
// L2085: The client asks for the focus.
|
||||||
|
case XEMBED_REQUEST_FOCUS:
|
||||||
|
if( ((QPublicWidget*)topLevelWidget())->topData()->embedded ) {
|
||||||
|
+ focusMap->remove( topLevelWidget() );
|
||||||
|
+ focusMap->insert( topLevelWidget(), new QGuardedPtr<QWidget>( this ));
|
||||||
|
WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId;
|
||||||
|
sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS );
|
||||||
|
} else {
|
@ -0,0 +1,44 @@
|
|||||||
|
Index: khtml/rendering/render_frames.cpp
|
||||||
|
===================================================================
|
||||||
|
--- khtml/rendering/render_frames.cpp.orig
|
||||||
|
+++ khtml/rendering/render_frames.cpp
|
||||||
|
@@ -940,14 +940,33 @@ void RenderPartObject::slotPartLoadingEr
|
||||||
|
// Prepare the URL to show in the question (host only if http, to make it short)
|
||||||
|
KURL pluginPageURL( embed->pluginPage );
|
||||||
|
QString shortURL = pluginPageURL.protocol() == "http" ? pluginPageURL.host() : pluginPageURL.prettyURL();
|
||||||
|
- int res = KMessageBox::questionYesNo( m_view,
|
||||||
|
- i18n("No plugin found for '%1'.\nDo you want to download one from %2?").arg(mimeName).arg(shortURL),
|
||||||
|
+
|
||||||
|
+ int res;
|
||||||
|
+ if (mimeName.startsWith("Shockwave Flash",false))
|
||||||
|
+ {
|
||||||
|
+ res = KMessageBox::questionYesNo( m_view,
|
||||||
|
+ i18n("No plugin found for '%1'.\nDo you want to download one from %2?").arg(mimeName).arg("openSUSE"),
|
||||||
|
i18n("Missing Plugin"), i18n("Download"), i18n("Do Not Download"), QString("plugin-")+serviceType);
|
||||||
|
- if ( res == KMessageBox::Yes )
|
||||||
|
+
|
||||||
|
+ if ( res == KMessageBox::Yes )
|
||||||
|
+ {
|
||||||
|
+ // Open YMP file
|
||||||
|
+ KURL ymp_flash ("http://download.opensuse.org/YaST/flash-player.ymp");
|
||||||
|
+ ext->openURLRequest( ymp_flash );
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
{
|
||||||
|
- // Display vendor download page
|
||||||
|
- ext->createNewWindow( pluginPageURL );
|
||||||
|
- return;
|
||||||
|
+ res = KMessageBox::questionYesNo( m_view,
|
||||||
|
+ i18n("No plugin found for '%1'.\nDo you want to download one from %2?").arg(mimeName).arg(shortURL),
|
||||||
|
+ i18n("Missing Plugin"), i18n("Download"), i18n("Do Not Download"), QString("plugin-")+serviceType);
|
||||||
|
+ if ( res == KMessageBox::Yes )
|
||||||
|
+ {
|
||||||
|
+ // Display vendor download page
|
||||||
|
+ ext->createNewWindow( pluginPageURL );
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,137 @@
|
|||||||
|
Index: kdeui/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/Makefile.am.orig
|
||||||
|
+++ kdeui/Makefile.am
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
|
||||||
|
SUBDIRS = . kdetrayproxy tests about
|
||||||
|
|
||||||
|
-INCLUDES= -I$(top_srcdir)/kdefx -I$(top_srcdir)/interfaces $(all_includes)
|
||||||
|
+INCLUDES= -I/usr/include/freetype2/ -I$(top_srcdir)/kdefx -I$(top_srcdir)/interfaces $(all_includes)
|
||||||
|
|
||||||
|
# For the future: examine if condensing the tons of *_LDFLAGS variables
|
||||||
|
# into $(all_libraries) isn't better
|
||||||
|
Index: kdeui/kaction.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kaction.cpp.orig
|
||||||
|
+++ kdeui/kaction.cpp
|
||||||
|
@@ -42,6 +42,17 @@
|
||||||
|
#include <ktoolbar.h>
|
||||||
|
#include <ktoolbarbutton.h>
|
||||||
|
|
||||||
|
+#include <ft2build.h>
|
||||||
|
+#include FT_FREETYPE_H
|
||||||
|
+#include <X11/Xdefs.h>
|
||||||
|
+#include <X11/Xlib.h>
|
||||||
|
+#include <X11/Xatom.h>
|
||||||
|
+#include <X11/Intrinsic.h>
|
||||||
|
+#include <X11/StringDefs.h>
|
||||||
|
+#include <X11/Shell.h>
|
||||||
|
+
|
||||||
|
+#include <X11/Xft/Xft.h>
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* How it works.
|
||||||
|
* KActionCollection is an organizing container for KActions.
|
||||||
|
Index: kdeui/kactionclasses.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kactionclasses.cpp.orig
|
||||||
|
+++ kdeui/kactionclasses.cpp
|
||||||
|
@@ -27,6 +27,9 @@
|
||||||
|
#include "kactionclasses.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
+#include <ft2build.h>
|
||||||
|
+#include FT_FREETYPE_H
|
||||||
|
+#include <fontconfig/fontconfig.h>
|
||||||
|
|
||||||
|
#include <qcursor.h>
|
||||||
|
#include <qclipboard.h>
|
||||||
|
@@ -35,6 +38,7 @@
|
||||||
|
#include <qwhatsthis.h>
|
||||||
|
#include <qtimer.h>
|
||||||
|
#include <qfile.h>
|
||||||
|
+#include <qregexp.h>
|
||||||
|
|
||||||
|
#include <dcopclient.h>
|
||||||
|
#include <dcopref.h>
|
||||||
|
@@ -1498,7 +1502,24 @@ void KFontAction::setFont( const QString
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- kdDebug(129) << "Font not found " << family.lower() << endl;
|
||||||
|
+
|
||||||
|
+ // nothing matched yet, try a fontconfig reverse lookup and
|
||||||
|
+ // check again to solve an alias
|
||||||
|
+ FcPattern *pattern = NULL;
|
||||||
|
+ FcConfig *config = NULL;
|
||||||
|
+ QString realFamily;
|
||||||
|
+ QRegExp regExp("[-:]");
|
||||||
|
+ pattern = FcNameParse( (unsigned char*) family.ascii() );
|
||||||
|
+ FcDefaultSubstitute(pattern);
|
||||||
|
+ FcConfigSubstitute (config, pattern, FcMatchPattern);
|
||||||
|
+ pattern = FcFontMatch(NULL, pattern, NULL);
|
||||||
|
+ realFamily = (char*)FcNameUnparse(pattern);
|
||||||
|
+ realFamily.remove(realFamily.find(regExp), realFamily.length());
|
||||||
|
+
|
||||||
|
+ if ( !realFamily.isEmpty() && realFamily != family )
|
||||||
|
+ setFont( realFamily );
|
||||||
|
+ else
|
||||||
|
+ kdDebug(129) << "Font not found " << family.lower() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
int KFontAction::plug( QWidget *w, int index )
|
||||||
|
Index: kdeui/kfontcombo.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kfontcombo.cpp.orig
|
||||||
|
+++ kdeui/kfontcombo.cpp
|
||||||
|
@@ -20,6 +20,7 @@
|
||||||
|
#include <qfontdatabase.h>
|
||||||
|
#include <qlistbox.h>
|
||||||
|
#include <qpainter.h>
|
||||||
|
+#include <qregexp.h>
|
||||||
|
|
||||||
|
#include <kcharsets.h>
|
||||||
|
#include <kconfig.h>
|
||||||
|
@@ -29,6 +30,18 @@
|
||||||
|
#include "kfontcombo.h"
|
||||||
|
#include "kfontcombo.moc"
|
||||||
|
|
||||||
|
+#include <ft2build.h>
|
||||||
|
+#include FT_FREETYPE_H
|
||||||
|
+#include <fontconfig/fontconfig.h>
|
||||||
|
+#include <X11/Xlib.h>
|
||||||
|
+#include <X11/Xatom.h>
|
||||||
|
+#include <X11/Intrinsic.h>
|
||||||
|
+#include <X11/StringDefs.h>
|
||||||
|
+#include <X11/Shell.h>
|
||||||
|
+
|
||||||
|
+#include <X11/Xft/Xft.h>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
struct KFontComboPrivate
|
||||||
|
{
|
||||||
|
KFontComboPrivate()
|
||||||
|
@@ -227,6 +240,22 @@ void KFontCombo::setCurrentFont(const QS
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // nothing matched yet, try a fontconfig reverse lookup and
|
||||||
|
+ // check again to solve an alias
|
||||||
|
+ FcPattern *pattern = NULL;
|
||||||
|
+ FcConfig *config = NULL;
|
||||||
|
+ QString realFamily;
|
||||||
|
+ QRegExp regExp("[-:]");
|
||||||
|
+ pattern = FcNameParse( (unsigned char*) family.ascii() );
|
||||||
|
+ FcDefaultSubstitute(pattern);
|
||||||
|
+ FcConfigSubstitute (config, pattern, FcMatchPattern);
|
||||||
|
+ pattern = FcFontMatch(NULL, pattern, NULL);
|
||||||
|
+ realFamily = (char*)FcNameUnparse(pattern);
|
||||||
|
+ realFamily.remove(realFamily.find(regExp), realFamily.length());
|
||||||
|
+
|
||||||
|
+ if ( !realFamily.isEmpty() && realFamily != family )
|
||||||
|
+ setCurrentFont( realFamily );
|
||||||
|
}
|
||||||
|
|
||||||
|
void KFontCombo::slotModified( int )
|
@ -0,0 +1,20 @@
|
|||||||
|
--- kioslave/ftp/ftp.cc.sav 2009-05-29 13:38:11.000000000 +0200
|
||||||
|
+++ kioslave/ftp/ftp.cc 2009-05-29 13:38:38.000000000 +0200
|
||||||
|
@@ -876,7 +876,7 @@ int Ftp::ftpOpenPASVDataConnection()
|
||||||
|
// The usual answer is '227 Entering Passive Mode. (160,39,200,55,6,245)'
|
||||||
|
// but anonftpd gives '227 =160,39,200,55,6,245'
|
||||||
|
int i[6];
|
||||||
|
- char *start = strchr(ftpResponse(3), '(');
|
||||||
|
+ const char *start = strchr(ftpResponse(3), '(');
|
||||||
|
if ( !start )
|
||||||
|
start = strchr(ftpResponse(3), '=');
|
||||||
|
if ( !start ||
|
||||||
|
@@ -931,7 +931,7 @@ int Ftp::ftpOpenEPSVDataConnection()
|
||||||
|
return ERR_INTERNAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- char *start = strchr(ftpResponse(3), '|');
|
||||||
|
+ const char *start = strchr(ftpResponse(3), '|');
|
||||||
|
if ( !start || sscanf(start, "|||%d|", &portnum) != 1)
|
||||||
|
return ERR_INTERNAL;
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
------------------------------------------------------------------------
|
||||||
|
r1074156 | mueller | 2010-01-13 16:02:53 +0100 (Mi, 13. Jan 2010) | 2 Zeilen
|
||||||
|
|
||||||
|
fix build with gcc 4.5
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
Index: kate/part/katehighlight.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kate/part/katehighlight.cpp (Revision 1074155)
|
||||||
|
+++ kate/part/katehighlight.cpp (Revision 1074156)
|
||||||
|
@@ -3225,7 +3225,7 @@ void KateHlManager::getDefaults(uint sch
|
||||||
|
list.append(charAttribute);
|
||||||
|
|
||||||
|
KateAttribute* string = new KateAttribute();
|
||||||
|
- string->setTextColor(QColor::QColor("#D00"));
|
||||||
|
+ string->setTextColor(QColor("#D00"));
|
||||||
|
string->setSelectedTextColor(Qt::red);
|
||||||
|
list.append(string);
|
||||||
|
|
||||||
|
@@ -3242,9 +3242,9 @@ void KateHlManager::getDefaults(uint sch
|
||||||
|
|
||||||
|
KateAttribute* alert = new KateAttribute();
|
||||||
|
alert->setTextColor(Qt::black);
|
||||||
|
- alert->setSelectedTextColor( QColor::QColor("#FCC") );
|
||||||
|
+ alert->setSelectedTextColor( QColor("#FCC") );
|
||||||
|
alert->setBold(true);
|
||||||
|
- alert->setBGColor( QColor::QColor("#FCC") );
|
||||||
|
+ alert->setBGColor( QColor("#FCC") );
|
||||||
|
list.append(alert);
|
||||||
|
|
||||||
|
KateAttribute* functionAttribute = new KateAttribute();
|
@ -0,0 +1,18 @@
|
|||||||
|
Index: khtml/html/html_elementimpl.cpp
|
||||||
|
===================================================================
|
||||||
|
--- khtml/html/html_elementimpl.cpp.orig
|
||||||
|
+++ khtml/html/html_elementimpl.cpp
|
||||||
|
@@ -565,6 +565,13 @@ DocumentFragment HTMLElementImpl::create
|
||||||
|
|
||||||
|
void HTMLElementImpl::setInnerHTML( const DOMString &html, int &exceptioncode )
|
||||||
|
{
|
||||||
|
+ // Works line innerText in Gecko
|
||||||
|
+ // ### test if needed for ID_SCRIPT as well.
|
||||||
|
+ if ( id() == ID_STYLE ) {
|
||||||
|
+ setInnerText(html, exceptioncode);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
DocumentFragment fragment = createContextualFragment( html );
|
||||||
|
if ( fragment.isNull() ) {
|
||||||
|
exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
|
@ -0,0 +1,18 @@
|
|||||||
|
--- kded/vfolder_menu.cpp 2009/11/07 07:01:12 1.1
|
||||||
|
+++ kded/vfolder_menu.cpp 2009/11/07 07:01:42
|
||||||
|
@@ -1496,6 +1496,7 @@
|
||||||
|
else
|
||||||
|
kdDebug()<<" Error in parsing show_empty attribute :"<<str<<endl;
|
||||||
|
}
|
||||||
|
+#if 0
|
||||||
|
if ( e.hasAttribute( "inline" ) )
|
||||||
|
{
|
||||||
|
QString str = e.attribute( "inline" );
|
||||||
|
@@ -1534,6 +1535,7 @@
|
||||||
|
else
|
||||||
|
kdDebug()<<" Error in parsing inline_alias attribute :"<<str<<endl;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
if( !option.isEmpty())
|
||||||
|
{
|
||||||
|
option = option.prepend(":O");
|
@ -0,0 +1,26 @@
|
|||||||
|
Index: pics/crystalsvg/index.theme
|
||||||
|
===================================================================
|
||||||
|
--- pics/crystalsvg/index.theme (Revision 505161)
|
||||||
|
+++ pics/crystalsvg/index.theme (Arbeitskopie)
|
||||||
|
@@ -78,7 +78,7 @@
|
||||||
|
Comment[zh_HK]=由 Everaldo.com 提供的圖示主題
|
||||||
|
DisplayDepth=32
|
||||||
|
|
||||||
|
-Inherits=hicolor
|
||||||
|
+Inherits=suseadds,hicolor
|
||||||
|
|
||||||
|
Example=folder
|
||||||
|
LinkOverlay=link_overlay
|
||||||
|
Index: kdecore/kicontheme.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kicontheme.cpp (Revision 458165)
|
||||||
|
+++ kdecore/kicontheme.cpp (Arbeitskopie)
|
||||||
|
@@ -146,6 +146,8 @@
|
||||||
|
if ( name != "crystalsvg" )
|
||||||
|
for ( QStringList::Iterator it = mInherits.begin(); it != mInherits.end(); ++it )
|
||||||
|
if ( *it == "default" || *it == "hicolor" ) *it="crystalsvg";
|
||||||
|
+ if ( name == "hicolor" )
|
||||||
|
+ mInherits = "crystalsuse";
|
||||||
|
|
||||||
|
d->hidden = cfg.readBoolEntry("Hidden", false);
|
||||||
|
d->example = cfg.readPathEntry("Example");
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: kdecore/kicontheme.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kicontheme.cpp.orig
|
||||||
|
+++ kdecore/kicontheme.cpp
|
||||||
|
@@ -150,6 +150,8 @@ KIconTheme::KIconTheme(const QString& na
|
||||||
|
if ( name != "crystalsvg" )
|
||||||
|
for ( QStringList::Iterator it = mInherits.begin(); it != mInherits.end(); ++it )
|
||||||
|
if ( *it == "default" || *it == "hicolor" ) *it="crystalsvg";
|
||||||
|
+ if ( name == "hicolor" )
|
||||||
|
+ mInherits = "crystalsuse";
|
||||||
|
|
||||||
|
d->hidden = cfg.readBoolEntry("Hidden", false);
|
||||||
|
d->example = cfg.readPathEntry("Example");
|
@ -0,0 +1,11 @@
|
|||||||
|
--- kdecore/svgicons/ksvgiconengine.cpp.orig 2011-03-15 01:29:21.172970849 +0300
|
||||||
|
+++ kdecore/svgicons/ksvgiconengine.cpp 2011-03-15 01:42:09.904779795 +0300
|
||||||
|
@@ -538,6 +538,8 @@
|
||||||
|
|
||||||
|
bool KSVGIconEngine::load(int width, int height, const QString &path)
|
||||||
|
{
|
||||||
|
+ if(path.isNull()) return false;
|
||||||
|
+
|
||||||
|
QDomDocument svgDocument("svg");
|
||||||
|
QFile file(path);
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
[Directories]
|
||||||
|
prefixes=/etc/opt/kde3/
|
||||||
|
userProfileMapFile=/etc/kde-user-profile
|
||||||
|
profileDirsPrefix=/var/lib/kde-profiles/
|
||||||
|
dir_wallpaper=/usr/share/wallpapers
|
||||||
|
|
||||||
|
[Directories-default]
|
||||||
|
ProfileDescription=Default Profile
|
||||||
|
ProfileInstallUser=root
|
||||||
|
prefixes=/var/lib/kde-profiles/default/
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
Index: kdecore/kconfigbackend.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kconfigbackend.cpp.orig
|
||||||
|
+++ kdecore/kconfigbackend.cpp
|
||||||
|
@@ -352,7 +352,11 @@ bool KConfigINIBackEnd::parseConfigFiles
|
||||||
|
#ifdef Q_WS_WIN
|
||||||
|
QString etc_kderc = QFile::decodeName( QCString(getenv("WINDIR")) + "\\kderc" );
|
||||||
|
#else
|
||||||
|
- QString etc_kderc = QString::fromLatin1("/etc/kderc");
|
||||||
|
+ QString etc_kderc;
|
||||||
|
+ if (checkAccess(QString::fromLatin1("/etc/kde3rc"), R_OK))
|
||||||
|
+ etc_kderc = QString::fromLatin1("/etc/kde3rc");
|
||||||
|
+ else
|
||||||
|
+ etc_kderc = QString::fromLatin1("/etc/kderc");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (checkAccess(etc_kderc, R_OK))
|
@ -0,0 +1,70 @@
|
|||||||
|
Index: kio/kio/kservice.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kservice.cpp.orig
|
||||||
|
+++ kio/kio/kservice.cpp
|
||||||
|
@@ -97,6 +97,7 @@ KService::init( KDesktopFile *config )
|
||||||
|
m_bValid = true;
|
||||||
|
|
||||||
|
bool absPath = !QDir::isRelativePath(entryPath());
|
||||||
|
+ bool kde4application = config->fileName().startsWith("/usr/share/applications/kde4/");
|
||||||
|
|
||||||
|
config->setDesktopGroup();
|
||||||
|
|
||||||
|
@@ -133,6 +134,8 @@ KService::init( KDesktopFile *config )
|
||||||
|
if (i != -1)
|
||||||
|
m_strName = m_strName.left(i);
|
||||||
|
}
|
||||||
|
+ if (kde4application)
|
||||||
|
+ m_strName += "/KDE4";
|
||||||
|
|
||||||
|
m_strType = config->readType();
|
||||||
|
entryMap.remove("Type");
|
||||||
|
@@ -196,6 +199,18 @@ KService::init( KDesktopFile *config )
|
||||||
|
name = name.left(pos);
|
||||||
|
|
||||||
|
m_strExec = config->readPathEntry( "Exec" );
|
||||||
|
+ if (kde4application && !m_strExec.startsWith("/"))
|
||||||
|
+ m_strExec = "/usr/bin/"+m_strExec;
|
||||||
|
+ else if (config->readBoolEntry("X-KDE-SubstituteUID")) {
|
||||||
|
+ int space = m_strExec.find(" ");
|
||||||
|
+ if (space==-1)
|
||||||
|
+ m_strExec = KStandardDirs::findExe(m_strExec);
|
||||||
|
+ else {
|
||||||
|
+ const QString command = m_strExec.left(space);
|
||||||
|
+ m_strExec.replace(command,KStandardDirs::findExe(command));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
entryMap.remove("Exec");
|
||||||
|
|
||||||
|
m_strIcon = config->readEntry( "Icon", "unknown" );
|
||||||
|
@@ -245,6 +260,8 @@ KService::init( KDesktopFile *config )
|
||||||
|
m_DCOPServiceType = DCOP_None;
|
||||||
|
|
||||||
|
m_strDesktopEntryName = name.lower();
|
||||||
|
+ if (kde4application)
|
||||||
|
+ m_strDesktopEntryName = "kde4-" + m_strDesktopEntryName;
|
||||||
|
|
||||||
|
m_bAllowAsDefault = config->readBoolEntry( "AllowDefault", true );
|
||||||
|
entryMap.remove("AllowDefault");
|
||||||
|
@@ -254,6 +271,8 @@ KService::init( KDesktopFile *config )
|
||||||
|
if ( m_initialPreference == 1 )
|
||||||
|
m_initialPreference = config->readNumEntry( "InitialPreference", 1 );
|
||||||
|
entryMap.remove("InitialPreference");
|
||||||
|
+ if (kde4application)
|
||||||
|
+ m_initialPreference = 1;
|
||||||
|
|
||||||
|
// Store all additional entries in the property map.
|
||||||
|
// A QMap<QString,QString> would be easier for this but we can't
|
||||||
|
@@ -263,7 +282,10 @@ KService::init( KDesktopFile *config )
|
||||||
|
for( ; it != entryMap.end();++it)
|
||||||
|
{
|
||||||
|
//qDebug(" Key = %s Data = %s", it.key().latin1(), it.data().latin1());
|
||||||
|
- m_mapProps.insert( it.key(), QVariant( it.data()));
|
||||||
|
+ QString key = it.key();
|
||||||
|
+ if (kde4application && key=="OnlyShowIn" && it.data()=="KDE;")
|
||||||
|
+ key = "NotShowIn";
|
||||||
|
+ m_mapProps.insert( key, QVariant( it.data()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
--- kdecore/fakes.c
|
||||||
|
+++ kdecore/fakes.c 2010/01/10 14:00:22
|
||||||
|
@@ -323,6 +323,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRLCPY
|
||||||
|
+#include <string.h>
|
||||||
|
KDECORE_EXPORT unsigned long strlcpy(char* d, const char* s, unsigned long bufsize)
|
||||||
|
{
|
||||||
|
unsigned long len, ret = strlen(s);
|
||||||
|
@@ -341,6 +342,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRLCAT
|
||||||
|
+#include <string.h>
|
||||||
|
KDECORE_EXPORT unsigned long strlcat(char* d, const char* s, unsigned long bufsize)
|
||||||
|
{
|
||||||
|
char *cp;
|
@ -0,0 +1,62 @@
|
|||||||
|
diff -pruN kdelibs-3.5.4.orig/kio/kssl/kopenssl.cc kdelibs-3.5.4/kio/kssl/kopenssl.cc
|
||||||
|
--- kdelibs-3.5.4.orig/kio/kssl/kopenssl.cc 2009-08-31 20:50:12.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.4/kio/kssl/kopenssl.cc 2009-08-31 21:46:47.000000000 +0200
|
||||||
|
@@ -196,6 +196,7 @@ static int (*K_X509_NAME_add_entry_by_tx
|
||||||
|
static X509_NAME *(*K_X509_NAME_new)() = 0L;
|
||||||
|
static int (*K_X509_REQ_set_subject_name)(X509_REQ*,X509_NAME*) = 0L;
|
||||||
|
static unsigned char *(*K_ASN1_STRING_data)(ASN1_STRING*) = 0L;
|
||||||
|
+static int (*K_ASN1_STRING_length)(ASN1_STRING*) = 0L;
|
||||||
|
static STACK_OF(SSL_CIPHER) *(*K_SSL_get_ciphers)(const SSL *ssl) = 0L;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -498,6 +499,7 @@ KConfig *cfg;
|
||||||
|
K_X509_NAME_new = (X509_NAME *(*)()) _cryptoLib->symbol("X509_NAME_new");
|
||||||
|
K_X509_REQ_set_subject_name = (int (*)(X509_REQ*,X509_NAME*)) _cryptoLib->symbol("X509_REQ_set_subject_name");
|
||||||
|
K_ASN1_STRING_data = (unsigned char *(*)(ASN1_STRING*)) _cryptoLib->symbol("ASN1_STRING_data");
|
||||||
|
+ K_ASN1_STRING_length = (int (*)(ASN1_STRING*)) _cryptoLib->symbol("ASN1_STRING_length");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1549,6 +1551,13 @@ unsigned char *KOpenSSLProxy::ASN1_STRIN
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+int KOpenSSLProxy::ASN1_STRING_length(ASN1_STRING *x) {
|
||||||
|
+ if (K_ASN1_STRING_length) return (K_ASN1_STRING_length)(x);
|
||||||
|
+ return 0L;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
STACK_OF(SSL_CIPHER) *KOpenSSLProxy::SSL_get_ciphers(const SSL* ssl) {
|
||||||
|
if (K_SSL_get_ciphers) return (K_SSL_get_ciphers)(ssl);
|
||||||
|
return 0L;
|
||||||
|
diff -pruN kdelibs-3.5.4.orig/kio/kssl/kopenssl.h kdelibs-3.5.4/kio/kssl/kopenssl.h
|
||||||
|
--- kdelibs-3.5.4.orig/kio/kssl/kopenssl.h 2006-07-22 10:16:39.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.4/kio/kssl/kopenssl.h 2009-08-31 21:46:47.000000000 +0200
|
||||||
|
@@ -622,6 +622,11 @@ public:
|
||||||
|
unsigned char *ASN1_STRING_data(ASN1_STRING *x);
|
||||||
|
|
||||||
|
/*
|
||||||
|
+ * ASN1_STRING_length
|
||||||
|
+ */
|
||||||
|
+ int ASN1_STRING_length(ASN1_STRING *x);
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int OBJ_obj2nid(ASN1_OBJECT *o);
|
||||||
|
diff -pruN kdelibs-3.5.4.orig/kio/kssl/ksslcertificate.cc kdelibs-3.5.4/kio/kssl/ksslcertificate.cc
|
||||||
|
--- kdelibs-3.5.4.orig/kio/kssl/ksslcertificate.cc 2006-01-19 18:06:12.000000000 +0100
|
||||||
|
+++ kdelibs-3.5.4/kio/kssl/ksslcertificate.cc 2009-08-31 21:54:38.000000000 +0200
|
||||||
|
@@ -1099,7 +1099,9 @@ QStringList KSSLCertificate::subjAltName
|
||||||
|
}
|
||||||
|
|
||||||
|
QString s = (const char *)d->kossl->ASN1_STRING_data(val->d.ia5);
|
||||||
|
- if (!s.isEmpty()) {
|
||||||
|
+ if (!s.isEmpty() &&
|
||||||
|
+ /* skip subjectAltNames with embedded NULs */
|
||||||
|
+ s.length() == d->kossl->ASN1_STRING_length(val->d.ia5)) {
|
||||||
|
rc += s;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
diff -ur kdelibs-3.5.10/khtml/css/cssparser.cpp kdelibs-3.5.10-cve-2009-1698/khtml/css/cssparser.cpp
|
||||||
|
--- kdelibs-3.5.10/khtml/css/cssparser.cpp 2007-01-15 12:34:04.000000000 +0100
|
||||||
|
+++ kdelibs-3.5.10-cve-2009-1698/khtml/css/cssparser.cpp 2009-07-26 05:46:39.000000000 +0200
|
||||||
|
@@ -1344,6 +1344,14 @@
|
||||||
|
if ( args->size() != 1)
|
||||||
|
return false;
|
||||||
|
Value *a = args->current();
|
||||||
|
+ if (a->unit != CSSPrimitiveValue::CSS_IDENT) {
|
||||||
|
+ isValid=false;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ if (qString(a->string)[0] == '-') {
|
||||||
|
+ isValid=false;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
parsedValue = new CSSPrimitiveValueImpl(domString(a->string), CSSPrimitiveValue::CSS_ATTR);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
@@ -1396,7 +1404,8 @@
|
||||||
|
|
||||||
|
CounterImpl *counter = new CounterImpl;
|
||||||
|
Value *i = args->current();
|
||||||
|
-// if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid;
|
||||||
|
+ if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid;
|
||||||
|
+ if (qString(i->string)[0] == '-') goto invalid;
|
||||||
|
counter->m_identifier = domString(i->string);
|
||||||
|
if (counters) {
|
||||||
|
i = args->next();
|
||||||
|
diff -ur kdelibs-3.5.10/khtml/css/css_valueimpl.cpp kdelibs-3.5.10-cve-2009-1698/khtml/css/css_valueimpl.cpp
|
||||||
|
--- kdelibs-3.5.10/khtml/css/css_valueimpl.cpp 2006-07-22 10:16:49.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.10-cve-2009-1698/khtml/css/css_valueimpl.cpp 2009-07-26 05:45:36.000000000 +0200
|
||||||
|
@@ -736,7 +736,9 @@
|
||||||
|
text = getValueName(m_value.ident);
|
||||||
|
break;
|
||||||
|
case CSSPrimitiveValue::CSS_ATTR:
|
||||||
|
- // ###
|
||||||
|
+ text = "attr(";
|
||||||
|
+ text += DOMString( m_value.string );
|
||||||
|
+ text += ")";
|
||||||
|
break;
|
||||||
|
case CSSPrimitiveValue::CSS_COUNTER:
|
||||||
|
text = "counter(";
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: khtml/html/htmltokenizer.cpp
|
||||||
|
===================================================================
|
||||||
|
--- khtml/html/htmltokenizer.cpp (revision 1002163)
|
||||||
|
+++ khtml/html/htmltokenizer.cpp (revision 1002164)
|
||||||
|
@@ -736,7 +736,7 @@
|
||||||
|
#ifdef TOKEN_DEBUG
|
||||||
|
kdDebug( 6036 ) << "unknown entity!" << endl;
|
||||||
|
#endif
|
||||||
|
- checkBuffer(10);
|
||||||
|
+ checkBuffer(11);
|
||||||
|
// ignore the sequence, add it to the buffer as plaintext
|
||||||
|
*dest++ = '&';
|
||||||
|
for(unsigned int i = 0; i < cBufferPos; i++)
|
@ -0,0 +1,30 @@
|
|||||||
|
diff -ur kdelibs-3.5.10/khtml/ecma/kjs_html.cpp kdelibs-3.5.10-cve-2009-2537-select-length/khtml/ecma/kjs_html.cpp
|
||||||
|
--- kdelibs-3.5.10/khtml/ecma/kjs_html.cpp 2008-02-13 10:41:09.000000000 +0100
|
||||||
|
+++ kdelibs-3.5.10-cve-2009-2537-select-length/khtml/ecma/kjs_html.cpp 2009-07-26 04:54:52.000000000 +0200
|
||||||
|
@@ -62,6 +62,9 @@
|
||||||
|
|
||||||
|
#include <kdebug.h>
|
||||||
|
|
||||||
|
+// CVE-2009-2537 (vendors agreed on max 10000 elements)
|
||||||
|
+#define MAX_SELECT_LENGTH 10000
|
||||||
|
+
|
||||||
|
namespace KJS {
|
||||||
|
|
||||||
|
KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(HTMLDocumentProto, DOMDocumentProto)
|
||||||
|
@@ -2550,8 +2553,14 @@
|
||||||
|
case SelectValue: { select.setValue(str); return; }
|
||||||
|
case SelectLength: { // read-only according to the NS spec, but webpages need it writeable
|
||||||
|
Object coll = Object::dynamicCast( getSelectHTMLCollection(exec, select.options(), select) );
|
||||||
|
- if ( coll.isValid() )
|
||||||
|
- coll.put(exec,"length",value);
|
||||||
|
+
|
||||||
|
+ if ( coll.isValid() ) {
|
||||||
|
+ if (value.toInteger(exec) >= MAX_SELECT_LENGTH) {
|
||||||
|
+ Object err = Error::create(exec, RangeError);
|
||||||
|
+ exec->setException(err);
|
||||||
|
+ } else
|
||||||
|
+ coll.put(exec, "length", value);
|
||||||
|
+ }
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// read-only: form
|
@ -0,0 +1,143 @@
|
|||||||
|
diff -ur kdelibs-3.5.10/kate/data/latex.xml kdelibs-3.5.10-latex-syntax-kile-2.0.3/kate/data/latex.xml
|
||||||
|
--- kdelibs-3.5.10/kate/data/latex.xml 2007-05-14 09:52:27.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.10-latex-syntax-kile-2.0.3/kate/data/latex.xml 2008-12-05 14:08:28.000000000 +0100
|
||||||
|
@@ -1,16 +1,18 @@
|
||||||
|
<?xml version="1.01" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||||||
|
-<language name="LaTeX" version="1.25" section="Markup" kateversion="2.3" extensions="*.tex; *.ltx; *.dtx; *.sty; *.cls;" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)+Holger Danielsson (holger.danielsson@versanet.de)+Michel Ludwig (michel.ludwig@kdemail.net)" license="LGPL" >
|
||||||
|
+<language name="LaTeX" version="1.29" section="Markup" kateversion="2.3" extensions="*.tex; *.ltx; *.dtx; *.sty; *.cls;" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)+Holger Danielsson (holger.danielsson@versanet.de)+Michel Ludwig (michel.ludwig@kdemail.net)+Thomas Braun (braun@physik.fu-berlin.de)" license="LGPL" >
|
||||||
|
<highlighting>
|
||||||
|
<contexts>
|
||||||
|
<!-- Normal text -->
|
||||||
|
<context name="Normal Text" attribute="Normal Text" lineEndContext="#stay">
|
||||||
|
<RegExpr String="\\begin(?=[^a-zA-Z])" attribute="Structure" context="FindEnvironment" beginRegion="block" />
|
||||||
|
<RegExpr String="\\end(?=[^a-zA-Z])" attribute="Structure" context="FindEnvironment" endRegion="block" />
|
||||||
|
- <RegExpr String="\\(label|pageref|ref|vpageref|vref|cite)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
|
||||||
|
+ <RegExpr String="\\(label|pageref|autoref|ref|vpageref|vref|cite)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
|
||||||
|
<RegExpr String="\\(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)\*?\s*(?=[\{\[])" attribute="Structure" context="Sectioning"/>
|
||||||
|
+ <RegExpr String="\\(footnote)\*?\s*(?=[\{\[])" attribute="Footnote" context="Footnoting"/>
|
||||||
|
<RegExpr String="\\(re)?newcommand(?=[^a-zA-Z])" attribute="Keyword" context="NewCommand"/>
|
||||||
|
<RegExpr String="\\(e|g|x)?def(?=[^a-zA-Z])" attribute="Keyword" context="DefCommand"/>
|
||||||
|
+ <RegExpr String="<<.*>>=" attribute="Normal Text" context="NoWeb" />
|
||||||
|
<StringDetect String="\(" attribute="Math" context="MathMode" beginRegion="mathMode" />
|
||||||
|
<StringDetect String="\[" attribute="Math" context="MathModeEquation" beginRegion="mathMode" />
|
||||||
|
<DetectChar char="\" attribute="Keyword" context="ContrSeq"/>
|
||||||
|
@@ -22,6 +24,11 @@
|
||||||
|
<DetectChar char="×" attribute="Bullet" context="#stay"/>
|
||||||
|
</context>
|
||||||
|
|
||||||
|
+ <!-- NoWeb -->
|
||||||
|
+ <context name="NoWeb" attribute="Normal Text" lineEndContext="#stay" >
|
||||||
|
+ <RegExpr String="^\s*@\s*" attribute="Normal Text" context="#pop" />
|
||||||
|
+ </context>
|
||||||
|
+
|
||||||
|
<!-- LaTeX sectioning commands -->
|
||||||
|
<context name="Sectioning" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
<RegExpr String="\[[^\]]*\]" attribute="Normal Text" context="#stay"/>
|
||||||
|
@@ -59,9 +66,46 @@
|
||||||
|
<RegExpr String="[^a-zA-Z]" attribute="Structure Keyword Mathmode" context="#pop" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
+ <!-- LaTeX Footnote commands -->
|
||||||
|
+ <context name="Footnoting" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
+ <RegExpr String="\[[^\]]*\]" attribute="Normal Text" context="#stay"/>
|
||||||
|
+ <DetectChar char=" " attribute="Normal Text" context="#stay"/>
|
||||||
|
+ <DetectChar char="{" attribute="Normal Text" context="FootnotingInside"/>
|
||||||
|
+ <DetectChar char="}" attribute="Normal Text" context="#pop"/>
|
||||||
|
+ <DetectChar char="%" attribute="Comment" context="Comment"/>
|
||||||
|
+ </context>
|
||||||
|
+ <context name="FootnotingInside" attribute="Footnote Text" lineEndContext="#stay">
|
||||||
|
+ <DetectChar char="{" attribute="Normal Text" context="FootnotingInside"/>
|
||||||
|
+ <DetectChar char="}" attribute="Normal Text" context="#pop"/>
|
||||||
|
+ <StringDetect String="\(" attribute="Footnote Math" context="FootnotingMathMode" beginRegion="mathMode" />
|
||||||
|
+ <DetectChar char="\" attribute="Footnote Keyword" context="FootnotingContrSeq"/>
|
||||||
|
+ <DetectChar char="$" attribute="Footnote Math" context="FootnotingMathMode" beginRegion="mathMode" />
|
||||||
|
+ <DetectChar char="%" attribute="Comment" context="Comment"/>
|
||||||
|
+ <DetectChar char="×" attribute="Bullet" context="#stay"/>
|
||||||
|
+ </context>
|
||||||
|
+ <context name="FootnotingContrSeq" attribute="Keyword" lineEndContext="#pop">
|
||||||
|
+ <DetectChar char="×" attribute="Bullet" context="#stay"/>
|
||||||
|
+ <RegExpr String="[a-zA-Z]+(\+?|\*{0,3})" attribute="Footnote Keyword" context="#pop"/>
|
||||||
|
+ <RegExpr String="[^a-zA-Z]" attribute="Footnote Keyword" context="#pop" />
|
||||||
|
+ </context>
|
||||||
|
+ <context name="FootnotingMathMode" attribute="Footnote Math" lineEndContext="#stay">
|
||||||
|
+ <StringDetect String="$$" attribute="Error" context="#stay" />
|
||||||
|
+ <DetectChar char="$" attribute="Footnote Math" context="#pop" endRegion="mathMode" />
|
||||||
|
+ <Detect2Chars char="\" char1=")" attribute="Footnote Math" context="#pop" endRegion="mathMode" />
|
||||||
|
+ <Detect2Chars char="\" char1="]" attribute="Error" context="#stay" />
|
||||||
|
+ <DetectChar char="\" attribute="Footnote Keyword Mathmode" context="FootnotingMathContrSeq"/>
|
||||||
|
+ <DetectChar char="%" attribute="Comment" context="Comment"/>
|
||||||
|
+ <DetectChar char="×" attribute="Bullet" context="#stay"/>
|
||||||
|
+ </context>
|
||||||
|
+ <context name="FootnotingMathContrSeq" attribute="Footnote Keyword Mathmode" lineEndContext="#pop">
|
||||||
|
+ <DetectChar char="×" attribute="Bullet" context="#stay"/>
|
||||||
|
+ <RegExpr String="[a-zA-Z]+\*?" attribute="Footnote Keyword Mathmode" context="#pop"/>
|
||||||
|
+ <RegExpr String="[^a-zA-Z]" attribute="Footnote Keyword Mathmode" context="#pop" />
|
||||||
|
+ </context>
|
||||||
|
+
|
||||||
|
<!-- LaTeX commands \newcommand and \renewcommand -->
|
||||||
|
<context name="NewCommand" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
- <RegExpr String="\s*\{\s*\\[a-zA-Z]+\s*\}(\[\d\](\[[^\]]+\])?)?\{" attribute="Normal Text" context="CommandParameterStart"/>
|
||||||
|
+ <RegExpr String="\s*\{\s*\\[a-zA-Z]+\s*\}(\[\d\](\[[^\]]*\])?)?\{" attribute="Normal Text" context="CommandParameterStart"/>
|
||||||
|
<DetectChar char="}" attribute="Error" context="#pop"/>
|
||||||
|
</context>
|
||||||
|
|
||||||
|
@@ -137,8 +181,9 @@
|
||||||
|
<context name="Environment" attribute="Environment" lineEndContext="#stay">
|
||||||
|
<RegExpr String="(lstlisting|(B|L)?Verbatim)" attribute="Environment" context="VerbatimEnvParam"/>
|
||||||
|
<RegExpr String="(verbatim|boxedverbatim)" attribute="Environment" context="VerbatimEnv"/>
|
||||||
|
- <RegExpr String="(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|flalign)" attribute="Environment" context="MathEnv"/>
|
||||||
|
<RegExpr String="(alignat|xalignat|xxalignat)" attribute="Environment" context="MathEnvParam"/>
|
||||||
|
+ <RegExpr String="(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|flalign)" attribute="Environment" context="MathEnv"/>
|
||||||
|
+ <RegExpr String="(tabular|supertabular|mpsupertabular|xtabular|mpxtabular|longtable)" attribute="Environment" context="TabEnv"/>
|
||||||
|
<DetectChar char="×" attribute="Bullet" context="#stay"/>
|
||||||
|
<RegExpr String="[a-zA-Z]" attribute="Environment" context="LatexEnv"/>
|
||||||
|
<RegExpr String="\s+" attribute="Error" context="#pop"/>
|
||||||
|
@@ -228,6 +273,28 @@
|
||||||
|
<DetectChar char="}" attribute="Normal Text" context="#pop#pop#pop#pop#pop" endRegion="block"/>
|
||||||
|
</context>
|
||||||
|
|
||||||
|
+ <!-- environment type 9: tabular -->
|
||||||
|
+ <context name="TabEnv" attribute="Environment" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop#pop">
|
||||||
|
+ <DetectChar char="}" attribute="Normal Text" context="Tab"/>
|
||||||
|
+ <RegExpr String="[a-zA-Z]" attribute="Environment" lookAhead="true" context="#pop"/>
|
||||||
|
+ <IncludeRules context="EnvCommon" />
|
||||||
|
+ </context>
|
||||||
|
+
|
||||||
|
+ <!-- parse tabular text -->
|
||||||
|
+ <context name="Tab" attribute="Tab" lineEndContext="#stay">
|
||||||
|
+ <DetectChar char="&" attribute="Ampersand" context="#stay"/>
|
||||||
|
+ <RegExpr String="@\{.*\}" minimal="true" attribute="Column Separator" context="#stay"/>
|
||||||
|
+ <RegExpr String="\\end(?=\s*\{(tabular|supertabular|mpsupertabular|xtabular|mpxtabular|longtable)\*?\})" attribute="Structure" context="TabFindEnd"/>
|
||||||
|
+ <IncludeRules context="Normal Text" />
|
||||||
|
+ </context>
|
||||||
|
+
|
||||||
|
+ <!-- end of tabular environment -->
|
||||||
|
+ <context name="TabFindEnd" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
+ <RegExpr String="\s*\{" attribute="Normal Text" context="#stay"/>
|
||||||
|
+ <RegExpr String="(tabular|supertabular|mpsupertabular|xtabular|mpxtabular|longtable)\*?" attribute="Environment" context="#stay"/>
|
||||||
|
+ <DetectChar char="}" attribute="Normal Text" context="#pop#pop#pop#pop#pop" endRegion="block"/>
|
||||||
|
+ </context>
|
||||||
|
+
|
||||||
|
<!-- math mode: starting with $ or \( -->
|
||||||
|
<context name="MathMode" attribute="Math" lineEndContext="#stay">
|
||||||
|
<StringDetect String="$$" attribute="Error" context="#stay" />
|
||||||
|
@@ -315,11 +382,18 @@
|
||||||
|
<itemData name="Verbatim" defStyleNum="dsNormal" color="#a08000" selColor="#80D0FF" bold="0" italic="0"/>
|
||||||
|
<itemData name="Region Marker" defStyleNum="dsRegionMarker" />
|
||||||
|
<itemData name="Bullet" defStyleNum="dsNormal" color="#FF00C4" bold="1" underline="1"/>
|
||||||
|
+ <itemData name="Ampersand" defStyleNum="dsNormal" color="#002793" bold="1" />
|
||||||
|
+ <itemData name="Column Separator" defStyleNum="dsNormal" color="#002793" />
|
||||||
|
<itemData name="Alert" defStyleNum="dsAlert" />
|
||||||
|
<itemData name="Structure Text" defStyleNum="dsNormal" color="#000000" selColor="#FFFFFF" bold="1" italic="0"/>
|
||||||
|
<itemData name="Structure Keyword" defStyleNum="dsNormal" color="#800000" selColor="#60FFFF" bold="1" italic="0"/>
|
||||||
|
<itemData name="Structure Math" defStyleNum="dsNormal" color="#00A000" selColor="#FF40FF" bold="1" italic="0"/>
|
||||||
|
<itemData name="Structure Keyword Mathmode" defStyleNum="dsNormal" color="#606000" selColor="#FFD0FF" bold="1" italic="0"/>
|
||||||
|
+ <itemData name="Footnote" defStyleNum="dsNormal" color="#800000" selColor="#60FFFF" bold="0" italic="0"/>
|
||||||
|
+ <itemData name="Footnote Text" defStyleNum="dsNormal" color="#000000" selColor="#FFFFFF" bold="0" italic="0"/>
|
||||||
|
+ <itemData name="Footnote Keyword" defStyleNum="dsNormal" color="#800000" selColor="#60FFFF" bold="0" italic="0"/>
|
||||||
|
+ <itemData name="Footnote Math" defStyleNum="dsNormal" color="#00A000" selColor="#FF40FF" bold="0" italic="0"/>
|
||||||
|
+ <itemData name="Footnote Keyword Mathmode" defStyleNum="dsNormal" color="#606000" selColor="#FFD0FF" bold="0" italic="0"/>
|
||||||
|
</itemDatas>
|
||||||
|
</highlighting>
|
||||||
|
|
@ -0,0 +1,180 @@
|
|||||||
|
diff -up kdelibs-3.5.10/kio/kssl/kopenssl.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/kopenssl.cc
|
||||||
|
--- kdelibs-3.5.10/kio/kssl/kopenssl.cc.ossl-1.x 2009-09-04 23:10:53.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.10/kio/kssl/kopenssl.cc 2009-09-04 23:10:53.000000000 +0200
|
||||||
|
@@ -96,9 +96,14 @@ static int (*K_BIO_write) (BIO *b, cons
|
||||||
|
static int (*K_PEM_ASN1_write_bio) (int (*)(),const char *,BIO *,char *,
|
||||||
|
const EVP_CIPHER *,unsigned char *,int ,
|
||||||
|
pem_password_cb *, void *) = 0L;
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+static int (*K_ASN1_item_i2d_fp)(ASN1_ITEM *,FILE *,unsigned char *) = 0L;
|
||||||
|
+static ASN1_ITEM *K_NETSCAPE_X509_it = 0L;
|
||||||
|
+#else
|
||||||
|
static ASN1_METHOD* (*K_X509_asn1_meth) (void) = 0L;
|
||||||
|
static int (*K_ASN1_i2d_fp)(int (*)(),FILE *,unsigned char *) = 0L;
|
||||||
|
static int (*K_i2d_ASN1_HEADER)(ASN1_HEADER *, unsigned char **) = 0L;
|
||||||
|
+#endif
|
||||||
|
static int (*K_X509_print_fp) (FILE *, X509*) = 0L;
|
||||||
|
static int (*K_i2d_PKCS12) (PKCS12*, unsigned char**) = 0L;
|
||||||
|
static int (*K_i2d_PKCS12_fp) (FILE *, PKCS12*) = 0L;
|
||||||
|
@@ -430,9 +435,14 @@ KConfig *cfg;
|
||||||
|
K_BIO_ctrl = (long (*) (BIO *,int,long,void *)) _cryptoLib->symbol("BIO_ctrl");
|
||||||
|
K_BIO_write = (int (*) (BIO *b, const void *data, int len)) _cryptoLib->symbol("BIO_write");
|
||||||
|
K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *,BIO*, char*, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) _cryptoLib->symbol("PEM_ASN1_write_bio");
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+ K_ASN1_item_i2d_fp = (int (*)(ASN1_ITEM *, FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_item_i2d_fp");
|
||||||
|
+ K_NETSCAPE_X509_it = (ASN1_ITEM *) _cryptoLib->symbol("NETSCAPE_X509_it");
|
||||||
|
+#else
|
||||||
|
K_X509_asn1_meth = (ASN1_METHOD* (*)(void)) _cryptoLib->symbol("X509_asn1_meth");
|
||||||
|
K_ASN1_i2d_fp = (int (*)(int (*)(), FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_i2d_fp");
|
||||||
|
K_i2d_ASN1_HEADER = (int (*)(ASN1_HEADER *, unsigned char **)) _cryptoLib->symbol("i2d_ASN1_HEADER");
|
||||||
|
+#endif
|
||||||
|
K_X509_print_fp = (int (*)(FILE*, X509*)) _cryptoLib->symbol("X509_print_fp");
|
||||||
|
K_i2d_PKCS12 = (int (*)(PKCS12*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS12");
|
||||||
|
K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12*)) _cryptoLib->symbol("i2d_PKCS12_fp");
|
||||||
|
@@ -594,7 +604,7 @@ KConfig *cfg;
|
||||||
|
K_SSL_set_session = (int (*)(SSL*,SSL_SESSION*)) _sslLib->symbol("SSL_set_session");
|
||||||
|
K_d2i_SSL_SESSION = (SSL_SESSION* (*)(SSL_SESSION**,unsigned char**, long)) _sslLib->symbol("d2i_SSL_SESSION");
|
||||||
|
K_i2d_SSL_SESSION = (int (*)(SSL_SESSION*,unsigned char**)) _sslLib->symbol("i2d_SSL_SESSION");
|
||||||
|
- K_SSL_get_ciphers = (STACK *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
|
||||||
|
+ K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -982,7 +992,13 @@ int KOpenSSLProxy::PEM_write_bio_X509(BI
|
||||||
|
else return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) {
|
||||||
|
+ if (K_ASN1_item_i2d_fp && K_NETSCAPE_X509_it)
|
||||||
|
+ return (K_ASN1_item_i2d_fp)(K_NETSCAPE_X509_it, out, x);
|
||||||
|
+ else return -1;
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
ASN1_METHOD *KOpenSSLProxy::X509_asn1_meth(void) {
|
||||||
|
if (K_X509_asn1_meth) return (K_X509_asn1_meth)();
|
||||||
|
else return 0L;
|
||||||
|
@@ -994,7 +1010,7 @@ int KOpenSSLProxy::ASN1_i2d_fp(FILE *out
|
||||||
|
return (K_ASN1_i2d_fp)((int (*)())K_i2d_ASN1_HEADER, out, x);
|
||||||
|
else return -1;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
int KOpenSSLProxy::X509_print(FILE *fp, X509 *x) {
|
||||||
|
if (K_X509_print_fp) return (K_X509_print_fp)(fp, x);
|
||||||
|
diff -up kdelibs-3.5.10/kio/kssl/kopenssl.h.ossl-1.x kdelibs-3.5.10/kio/kssl/kopenssl.h
|
||||||
|
--- kdelibs-3.5.10/kio/kssl/kopenssl.h.ossl-1.x 2006-07-22 10:16:39.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.10/kio/kssl/kopenssl.h 2009-09-04 23:10:53.000000000 +0200
|
||||||
|
@@ -48,6 +48,9 @@ class KOpenSSLProxyPrivate;
|
||||||
|
#include <openssl/stack.h>
|
||||||
|
#include <openssl/bn.h>
|
||||||
|
#undef crypt
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+#define STACK _STACK
|
||||||
|
+#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <kstaticdeleter.h>
|
||||||
|
@@ -446,12 +449,12 @@ public:
|
||||||
|
*/
|
||||||
|
int PEM_write_bio_X509(BIO *bp, X509 *x);
|
||||||
|
|
||||||
|
-
|
||||||
|
+#if OPENSSL_VERSION_NUMBER < 0x10000000L
|
||||||
|
/*
|
||||||
|
* X509_asn1_meth - used for netscape output
|
||||||
|
*/
|
||||||
|
ASN1_METHOD *X509_asn1_meth();
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ASN1_i2d_fp - used for netscape output
|
||||||
|
@@ -531,6 +534,9 @@ public:
|
||||||
|
*/
|
||||||
|
void sk_free(STACK *s);
|
||||||
|
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+ void sk_free(void *s) { return sk_free(reinterpret_cast<STACK*>(s)); }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Number of elements in the stack
|
||||||
|
@@ -543,6 +549,9 @@ public:
|
||||||
|
*/
|
||||||
|
char *sk_value(STACK *s, int n);
|
||||||
|
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+ char *sk_value(void *s, int n) { return sk_value(reinterpret_cast<STACK*>(s), n); }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a new stack
|
||||||
|
@@ -555,6 +564,9 @@ public:
|
||||||
|
*/
|
||||||
|
int sk_push(STACK *s, char *d);
|
||||||
|
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+ int sk_push(void *s, void *d) { return sk_push(reinterpret_cast<STACK*>(s), reinterpret_cast<char*>(d)); }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Duplicate the stack
|
||||||
|
diff -up kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc
|
||||||
|
--- kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc.ossl-1.x 2005-10-10 17:05:44.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc 2009-09-04 23:10:53.000000000 +0200
|
||||||
|
@@ -87,7 +87,7 @@ KSMIMECryptoPrivate::KSMIMECryptoPrivate
|
||||||
|
|
||||||
|
|
||||||
|
STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(QPtrList<KSSLCertificate> &certs) {
|
||||||
|
- STACK_OF(X509) *x509 = sk_new(NULL);
|
||||||
|
+ STACK_OF(X509) *x509 = reinterpret_cast<STACK_OF(X509)*>(sk_new(NULL));
|
||||||
|
KSSLCertificate *cert = certs.first();
|
||||||
|
while(cert) {
|
||||||
|
sk_X509_push(x509, cert->getCert());
|
||||||
|
diff -up kdelibs-3.5.10/kio/kssl/ksslcertificate.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/ksslcertificate.cc
|
||||||
|
--- kdelibs-3.5.10/kio/kssl/ksslcertificate.cc.ossl-1.x 2006-01-19 18:06:12.000000000 +0100
|
||||||
|
+++ kdelibs-3.5.10/kio/kssl/ksslcertificate.cc 2009-09-04 23:10:53.000000000 +0200
|
||||||
|
@@ -1003,17 +1003,31 @@ return qba;
|
||||||
|
QByteArray KSSLCertificate::toNetscape() {
|
||||||
|
QByteArray qba;
|
||||||
|
#ifdef KSSL_HAVE_SSL
|
||||||
|
-ASN1_HEADER ah;
|
||||||
|
-ASN1_OCTET_STRING os;
|
||||||
|
-KTempFile ktf;
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+ NETSCAPE_X509 nx;
|
||||||
|
+ ASN1_OCTET_STRING hdr;
|
||||||
|
+#else
|
||||||
|
+ ASN1_HEADER ah;
|
||||||
|
+ ASN1_OCTET_STRING os;
|
||||||
|
+#endif
|
||||||
|
+ KTempFile ktf;
|
||||||
|
|
||||||
|
- os.data = (unsigned char *)NETSCAPE_CERT_HDR;
|
||||||
|
- os.length = strlen(NETSCAPE_CERT_HDR);
|
||||||
|
- ah.header = &os;
|
||||||
|
- ah.data = (char *)getCert();
|
||||||
|
- ah.meth = d->kossl->X509_asn1_meth();
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
+ hdr.data = (unsigned char *)NETSCAPE_CERT_HDR;
|
||||||
|
+ hdr.length = strlen(NETSCAPE_CERT_HDR);
|
||||||
|
+ nx.header = &hdr;
|
||||||
|
+ nx.cert = getCert();
|
||||||
|
+
|
||||||
|
+ d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&nx);
|
||||||
|
+#else
|
||||||
|
+ os.data = (unsigned char *)NETSCAPE_CERT_HDR;
|
||||||
|
+ os.length = strlen(NETSCAPE_CERT_HDR);
|
||||||
|
+ ah.header = &os;
|
||||||
|
+ ah.data = (char *)getCert();
|
||||||
|
+ ah.meth = d->kossl->X509_asn1_meth();
|
||||||
|
|
||||||
|
- d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah);
|
||||||
|
+ d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
ktf.close();
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,545 @@
|
|||||||
|
--- kdelibs-3.5.4/khtml/html/RefPtr.h.CVE-2009-1690 2009-06-17 14:19:00.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.4/khtml/html/RefPtr.h 2009-06-17 14:19:00.000000000 +0200
|
||||||
|
@@ -0,0 +1,202 @@
|
||||||
|
+// -*- mode: c++; c-basic-offset: 4 -*-
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
|
||||||
|
+ *
|
||||||
|
+ * This library is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU Library General Public
|
||||||
|
+ * License as published by the Free Software Foundation; either
|
||||||
|
+ * version 2 of the License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This library is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ * Library General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * You should have received a copy of the GNU Library General Public License
|
||||||
|
+ * along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
+ * Boston, MA 02110-1301, USA.
|
||||||
|
+ *
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef WTF_RefPtr_h
|
||||||
|
+#define WTF_RefPtr_h
|
||||||
|
+
|
||||||
|
+#include <algorithm>
|
||||||
|
+#include "AlwaysInline.h"
|
||||||
|
+
|
||||||
|
+namespace WTF {
|
||||||
|
+
|
||||||
|
+ enum PlacementNewAdoptType { PlacementNewAdopt };
|
||||||
|
+
|
||||||
|
+ template <typename T> class PassRefPtr;
|
||||||
|
+
|
||||||
|
+ enum HashTableDeletedValueType { HashTableDeletedValue };
|
||||||
|
+
|
||||||
|
+ template <typename T> class RefPtr {
|
||||||
|
+ public:
|
||||||
|
+ RefPtr() : m_ptr(0) { }
|
||||||
|
+ RefPtr(T* ptr) : m_ptr(ptr) { if (ptr) ptr->ref(); }
|
||||||
|
+ RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { if (T* ptr = m_ptr) ptr->ref(); }
|
||||||
|
+ // see comment in PassRefPtr.h for why this takes const reference
|
||||||
|
+ template <typename U> RefPtr(const PassRefPtr<U>&);
|
||||||
|
+
|
||||||
|
+ // Special constructor for cases where we overwrite an object in place.
|
||||||
|
+ RefPtr(PlacementNewAdoptType) { }
|
||||||
|
+
|
||||||
|
+ // Hash table deleted values, which are only constructed and never copied or destroyed.
|
||||||
|
+ RefPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
|
||||||
|
+ bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
|
||||||
|
+
|
||||||
|
+ ~RefPtr() { if (T* ptr = m_ptr) ptr->deref(); }
|
||||||
|
+
|
||||||
|
+ template <typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { if (T* ptr = m_ptr) ptr->ref(); }
|
||||||
|
+
|
||||||
|
+ T* get() const { return m_ptr; }
|
||||||
|
+
|
||||||
|
+ void clear() { if (T* ptr = m_ptr) ptr->deref(); m_ptr = 0; }
|
||||||
|
+ PassRefPtr<T> release() { PassRefPtr<T> tmp = adoptRef(m_ptr); m_ptr = 0; return tmp; }
|
||||||
|
+
|
||||||
|
+ T& operator*() const { return *m_ptr; }
|
||||||
|
+ ALWAYS_INLINE T* operator->() const { return m_ptr; }
|
||||||
|
+
|
||||||
|
+ bool operator!() const { return !m_ptr; }
|
||||||
|
+
|
||||||
|
+ // This conversion operator allows implicit conversion to bool but not to other integer types.
|
||||||
|
+ typedef T* RefPtr::*UnspecifiedBoolType;
|
||||||
|
+ operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; }
|
||||||
|
+
|
||||||
|
+ RefPtr& operator=(const RefPtr&);
|
||||||
|
+ RefPtr& operator=(T*);
|
||||||
|
+ RefPtr& operator=(const PassRefPtr<T>&);
|
||||||
|
+ template <typename U> RefPtr& operator=(const RefPtr<U>&);
|
||||||
|
+ template <typename U> RefPtr& operator=(const PassRefPtr<U>&);
|
||||||
|
+
|
||||||
|
+ void swap(RefPtr&);
|
||||||
|
+
|
||||||
|
+ private:
|
||||||
|
+ static T* hashTableDeletedValue() { return reinterpret_cast<T*>(-1); }
|
||||||
|
+
|
||||||
|
+ T* m_ptr;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ template <typename T> template <typename U> inline RefPtr<T>::RefPtr(const PassRefPtr<U>& o)
|
||||||
|
+ : m_ptr(o.releaseRef())
|
||||||
|
+ {
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<T>& o)
|
||||||
|
+ {
|
||||||
|
+ T* optr = o.get();
|
||||||
|
+ if (optr)
|
||||||
|
+ optr->ref();
|
||||||
|
+ T* ptr = m_ptr;
|
||||||
|
+ m_ptr = optr;
|
||||||
|
+ if (ptr)
|
||||||
|
+ ptr->deref();
|
||||||
|
+ return *this;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T> template <typename U> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<U>& o)
|
||||||
|
+ {
|
||||||
|
+ T* optr = o.get();
|
||||||
|
+ if (optr)
|
||||||
|
+ optr->ref();
|
||||||
|
+ T* ptr = m_ptr;
|
||||||
|
+ m_ptr = optr;
|
||||||
|
+ if (ptr)
|
||||||
|
+ ptr->deref();
|
||||||
|
+ return *this;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(T* optr)
|
||||||
|
+ {
|
||||||
|
+ if (optr)
|
||||||
|
+ optr->ref();
|
||||||
|
+ T* ptr = m_ptr;
|
||||||
|
+ m_ptr = optr;
|
||||||
|
+ if (ptr)
|
||||||
|
+ ptr->deref();
|
||||||
|
+ return *this;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<T>& o)
|
||||||
|
+ {
|
||||||
|
+ T* ptr = m_ptr;
|
||||||
|
+ m_ptr = o.releaseRef();
|
||||||
|
+ if (ptr)
|
||||||
|
+ ptr->deref();
|
||||||
|
+ return *this;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T> template <typename U> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<U>& o)
|
||||||
|
+ {
|
||||||
|
+ T* ptr = m_ptr;
|
||||||
|
+ m_ptr = o.releaseRef();
|
||||||
|
+ if (ptr)
|
||||||
|
+ ptr->deref();
|
||||||
|
+ return *this;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <class T> inline void RefPtr<T>::swap(RefPtr<T>& o)
|
||||||
|
+ {
|
||||||
|
+ std::swap(m_ptr, o.m_ptr);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <class T> inline void swap(RefPtr<T>& a, RefPtr<T>& b)
|
||||||
|
+ {
|
||||||
|
+ a.swap(b);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T, typename U> inline bool operator==(const RefPtr<T>& a, const RefPtr<U>& b)
|
||||||
|
+ {
|
||||||
|
+ return a.get() == b.get();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T, typename U> inline bool operator==(const RefPtr<T>& a, U* b)
|
||||||
|
+ {
|
||||||
|
+ return a.get() == b;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T, typename U> inline bool operator==(T* a, const RefPtr<U>& b)
|
||||||
|
+ {
|
||||||
|
+ return a == b.get();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const RefPtr<U>& b)
|
||||||
|
+ {
|
||||||
|
+ return a.get() != b.get();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T, typename U> inline bool operator!=(const RefPtr<T>& a, U* b)
|
||||||
|
+ {
|
||||||
|
+ return a.get() != b;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T, typename U> inline bool operator!=(T* a, const RefPtr<U>& b)
|
||||||
|
+ {
|
||||||
|
+ return a != b.get();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T, typename U> inline RefPtr<T> static_pointer_cast(const RefPtr<U>& p)
|
||||||
|
+ {
|
||||||
|
+ return RefPtr<T>(static_cast<T*>(p.get()));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T, typename U> inline RefPtr<T> const_pointer_cast(const RefPtr<U>& p)
|
||||||
|
+ {
|
||||||
|
+ return RefPtr<T>(const_cast<T*>(p.get()));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ template <typename T> inline T* getPtr(const RefPtr<T>& p)
|
||||||
|
+ {
|
||||||
|
+ return p.get();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+} // namespace WTF
|
||||||
|
+
|
||||||
|
+using WTF::RefPtr;
|
||||||
|
+using WTF::static_pointer_cast;
|
||||||
|
+using WTF::const_pointer_cast;
|
||||||
|
+
|
||||||
|
+#endif // WTF_RefPtr_h
|
||||||
|
--- kdelibs-3.5.4/khtml/html/htmlparser.cpp.CVE-2009-1690 2006-07-22 10:16:43.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.4/khtml/html/htmlparser.cpp 2009-06-17 11:51:15.000000000 +0200
|
||||||
|
@@ -199,7 +199,6 @@
|
||||||
|
|
||||||
|
form = 0;
|
||||||
|
map = 0;
|
||||||
|
- head = 0;
|
||||||
|
end = false;
|
||||||
|
isindex = 0;
|
||||||
|
|
||||||
|
@@ -616,8 +615,7 @@
|
||||||
|
case ID_BASE:
|
||||||
|
if(!head) {
|
||||||
|
head = new HTMLHeadElementImpl(document);
|
||||||
|
- e = head;
|
||||||
|
- insertNode(e);
|
||||||
|
+ insertNode(head.get());
|
||||||
|
handled = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
@@ -839,7 +837,7 @@
|
||||||
|
case ID_HEAD:
|
||||||
|
if(!head && current->id() == ID_HTML) {
|
||||||
|
head = new HTMLHeadElementImpl(document);
|
||||||
|
- n = head;
|
||||||
|
+ n = head.get();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ID_BODY:
|
||||||
|
@@ -1679,12 +1677,12 @@
|
||||||
|
head = new HTMLHeadElementImpl(document);
|
||||||
|
HTMLElementImpl *body = doc()->body();
|
||||||
|
int exceptioncode = 0;
|
||||||
|
- doc()->firstChild()->insertBefore(head, body, exceptioncode);
|
||||||
|
+ doc()->firstChild()->insertBefore(head.get(), body, exceptioncode);
|
||||||
|
if ( exceptioncode ) {
|
||||||
|
#ifdef PARSER_DEBUG
|
||||||
|
kdDebug( 6035 ) << "creation of head failed!!!!" << endl;
|
||||||
|
#endif
|
||||||
|
- delete head;
|
||||||
|
+ delete head.get();
|
||||||
|
head = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--- kdelibs-3.5.4/khtml/html/Platform.h.CVE-2009-1690 2009-06-17 14:19:07.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.4/khtml/html/Platform.h 2009-06-17 14:19:07.000000000 +0200
|
||||||
|
@@ -0,0 +1,218 @@
|
||||||
|
+/* -*- mode: c++; c-basic-offset: 4 -*- */
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
|
||||||
|
+ *
|
||||||
|
+ * Redistribution and use in source and binary forms, with or without
|
||||||
|
+ * modification, are permitted provided that the following conditions
|
||||||
|
+ * are met:
|
||||||
|
+ * 1. Redistributions of source code must retain the above copyright
|
||||||
|
+ * notice, this list of conditions and the following disclaimer.
|
||||||
|
+ * 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
+ * notice, this list of conditions and the following disclaimer in the
|
||||||
|
+ * documentation and/or other materials provided with the distribution.
|
||||||
|
+ *
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
|
||||||
|
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
|
||||||
|
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||||
|
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef WTF_Platform_h
|
||||||
|
+#define WTF_Platform_h
|
||||||
|
+
|
||||||
|
+/* Force KDE build here in our tree... */
|
||||||
|
+#ifndef BUILDING_KDE__
|
||||||
|
+#define BUILDING_KDE__ 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* PLATFORM handles OS, operating environment, graphics API, and CPU */
|
||||||
|
+#define PLATFORM(WTF_FEATURE) (defined( WTF_PLATFORM_##WTF_FEATURE ) && WTF_PLATFORM_##WTF_FEATURE)
|
||||||
|
+#define COMPILER(WTF_FEATURE) (defined( WTF_COMPILER_##WTF_FEATURE ) && WTF_COMPILER_##WTF_FEATURE)
|
||||||
|
+#define HAVE(WTF_FEATURE) (defined( HAVE_##WTF_FEATURE ) && HAVE_##WTF_FEATURE)
|
||||||
|
+#define USE(WTF_FEATURE) (defined( WTF_USE_##WTF_FEATURE ) && WTF_USE_##WTF_FEATURE)
|
||||||
|
+#define ENABLE(WTF_FEATURE) (defined( ENABLE_##WTF_FEATURE ) && ENABLE_##WTF_FEATURE)
|
||||||
|
+
|
||||||
|
+/* Operating systems - low-level dependencies */
|
||||||
|
+
|
||||||
|
+/* PLATFORM(DARWIN) */
|
||||||
|
+/* Operating system level dependencies for Mac OS X / Darwin that should */
|
||||||
|
+/* be used regardless of operating environment */
|
||||||
|
+#ifdef __APPLE__
|
||||||
|
+#define WTF_PLATFORM_DARWIN 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* PLATFORM(WIN_OS) */
|
||||||
|
+/* Operating system level dependencies for Windows that should be used */
|
||||||
|
+/* regardless of operating environment */
|
||||||
|
+#if defined(WIN32) || defined(_WIN32)
|
||||||
|
+#define WTF_PLATFORM_WIN_OS 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* PLATFORM(UNIX) */
|
||||||
|
+/* Operating system level dependencies for Unix-like systems that */
|
||||||
|
+/* should be used regardless of operating environment */
|
||||||
|
+/* (includes PLATFORM(DARWIN)) */
|
||||||
|
+#if defined(__APPLE__) \
|
||||||
|
+ || defined(unix) \
|
||||||
|
+ || defined(__unix) \
|
||||||
|
+ || defined(__unix__) \
|
||||||
|
+ || defined (__NetBSD__) \
|
||||||
|
+ || defined(_AIX)
|
||||||
|
+#define WTF_PLATFORM_UNIX 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* PLATFORM(SOLARIS_OS) */
|
||||||
|
+/* Operating system level dependencies for Sun (Open)Solaris 10. */
|
||||||
|
+/* Studio 12 on Solaris defines __SunOS; gcc defines __sun__; */
|
||||||
|
+/* Both compilers define __sun and sun. */
|
||||||
|
+#if defined(__sun) || defined(sun)
|
||||||
|
+#define WTF_PLATFORM_SOLARIS_OS 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* Operating environments */
|
||||||
|
+
|
||||||
|
+/* I made the BUILDING_KDE__ macro up for the KDE build system to define */
|
||||||
|
+
|
||||||
|
+/* PLATFORM(KDE) */
|
||||||
|
+/* PLATFORM(MAC) */
|
||||||
|
+/* PLATFORM(WIN) */
|
||||||
|
+#if BUILDING_KDE__
|
||||||
|
+#define WTF_PLATFORM_KDE 1
|
||||||
|
+#elif PLATFORM(DARWIN)
|
||||||
|
+#define WTF_PLATFORM_MAC 1
|
||||||
|
+#elif PLATFORM(WIN_OS)
|
||||||
|
+#define WTF_PLATFORM_WIN 1
|
||||||
|
+#endif
|
||||||
|
+#if defined(BUILDING_GDK__)
|
||||||
|
+#define WTF_PLATFORM_GDK 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* CPU */
|
||||||
|
+
|
||||||
|
+/* PLATFORM(PPC) */
|
||||||
|
+#if defined(__ppc__) \
|
||||||
|
+ || defined(__PPC__) \
|
||||||
|
+ || defined(__powerpc__) \
|
||||||
|
+ || defined(__powerpc) \
|
||||||
|
+ || defined(__POWERPC__) \
|
||||||
|
+ || defined(_M_PPC) \
|
||||||
|
+ || defined(__PPC)
|
||||||
|
+#define WTF_PLATFORM_PPC 1
|
||||||
|
+#define WTF_PLATFORM_BIG_ENDIAN 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* PLATFORM(PPC64) */
|
||||||
|
+#if defined(__ppc64__) \
|
||||||
|
+ || defined(__PPC64__)
|
||||||
|
+#define WTF_PLATFORM_PPC64 1
|
||||||
|
+#define WTF_PLATFORM_BIG_ENDIAN 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if defined(arm)
|
||||||
|
+#define WTF_PLATFORM_ARM 1
|
||||||
|
+#if defined(__ARMEB__)
|
||||||
|
+#define WTF_PLATFORM_BIG_ENDIAN 1
|
||||||
|
+#elif !defined(__ARM_EABI__) && !defined(__ARMEB__)
|
||||||
|
+#define WTF_PLATFORM_MIDDLE_ENDIAN 1
|
||||||
|
+#endif
|
||||||
|
+#if !defined(__ARM_EABI__)
|
||||||
|
+#define WTF_PLATFORM_FORCE_PACK 1
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* PLATFORM(X86) */
|
||||||
|
+#if defined(__i386__) \
|
||||||
|
+ || defined(i386) \
|
||||||
|
+ || defined(_M_IX86) \
|
||||||
|
+ || defined(_X86_) \
|
||||||
|
+ || defined(__THW_INTEL)
|
||||||
|
+#define WTF_PLATFORM_X86 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* PLATFORM(X86_64) */
|
||||||
|
+#if defined(__x86_64__) \
|
||||||
|
+ || defined(__ia64__)
|
||||||
|
+#define WTF_PLATFORM_X86_64 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* PLATFORM(SPARC) */
|
||||||
|
+#if defined(sparc)
|
||||||
|
+#define WTF_PLATFORM_SPARC 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* Compiler */
|
||||||
|
+
|
||||||
|
+/* COMPILER(CWP) */
|
||||||
|
+#if defined(__MWERKS__)
|
||||||
|
+#define WTF_COMPILER_CWP 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* COMPILER(MSVC) */
|
||||||
|
+#if defined(_MSC_VER)
|
||||||
|
+#define WTF_COMPILER_MSVC 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* COMPILER(GCC) */
|
||||||
|
+#if defined(__GNUC__)
|
||||||
|
+#define WTF_COMPILER_GCC 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* COMPILER(SUNPRO) */
|
||||||
|
+#if defined(__SUNPRO_CC)
|
||||||
|
+#define WTF_COMPILER_SUNPRO 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* COMPILER(BORLAND) */
|
||||||
|
+/* not really fully supported - is this relevant any more? */
|
||||||
|
+#if defined(__BORLANDC__)
|
||||||
|
+#define WTF_COMPILER_BORLAND 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* COMPILER(CYGWIN) */
|
||||||
|
+/* not really fully supported - is this relevant any more? */
|
||||||
|
+#if defined(__CYGWIN__)
|
||||||
|
+#define WTF_COMPILER_CYGWIN 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* multiple threads only supported on Mac for now */
|
||||||
|
+#if PLATFORM(MAC)
|
||||||
|
+#ifndef WTF_USE_MULTIPLE_THREADS
|
||||||
|
+#define WTF_USE_MULTIPLE_THREADS 1
|
||||||
|
+#endif
|
||||||
|
+#ifndef WTF_USE_BINDINGS
|
||||||
|
+#define WTF_USE_BINDINGS 1
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* for Unicode, KDE uses Qt, everything else uses ICU */
|
||||||
|
+#if PLATFORM(KDE) || PLATFORM(QT)
|
||||||
|
+#define WTF_USE_QT4_UNICODE 1
|
||||||
|
+#elif PLATFORM(SYMBIAN)
|
||||||
|
+#define WTF_USE_SYMBIAN_UNICODE 1
|
||||||
|
+#else
|
||||||
|
+#define WTF_USE_ICU_UNICODE 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if PLATFORM(MAC)
|
||||||
|
+#define WTF_PLATFORM_CF 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if PLATFORM(WIN)
|
||||||
|
+#define WTF_USE_WININET 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if PLATFORM(GDK)
|
||||||
|
+#define WTF_USE_CURL 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* ENABLE macro defaults */
|
||||||
|
+
|
||||||
|
+#endif /* WTF_Platform_h */
|
||||||
|
--- kdelibs-3.5.4/khtml/html/AlwaysInline.h.CVE-2009-1690 2009-06-17 14:18:52.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.4/khtml/html/AlwaysInline.h 2009-06-17 13:56:36.000000000 +0200
|
||||||
|
@@ -0,0 +1,49 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
|
||||||
|
+ *
|
||||||
|
+ * This library is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU Library General Public
|
||||||
|
+ * License as published by the Free Software Foundation; either
|
||||||
|
+ * version 2 of the License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This library is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ * Library General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * You should have received a copy of the GNU Library General Public License
|
||||||
|
+ * along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
+ * Boston, MA 02110-1301, USA.
|
||||||
|
+ *
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "html/Platform.h"
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+#ifndef ALWAYS_INLINE
|
||||||
|
+#if COMPILER(GCC) && defined(NDEBUG) && __GNUC__ > 3
|
||||||
|
+#define ALWAYS_INLINE inline __attribute__ ((__always_inline__))
|
||||||
|
+#elif COMPILER(MSVC) && defined(NDEBUG)
|
||||||
|
+#define ALWAYS_INLINE __forceinline
|
||||||
|
+#else
|
||||||
|
+#define ALWAYS_INLINE inline
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#ifndef ALWAYS_INLINE_INTO
|
||||||
|
+#if COMPILER(GCC) && defined(NDEBUG) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || __GNUC__ > 4)
|
||||||
|
+#define ALWAYS_INLINE_INTO __attribute__ ((__flatten__))
|
||||||
|
+#else
|
||||||
|
+#define ALWAYS_INLINE_INTO
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+#ifndef NEVER_INLINE
|
||||||
|
+#if COMPILER(GCC) && __GNUC__ > 3
|
||||||
|
+#define NEVER_INLINE __attribute__ ((__noinline__))
|
||||||
|
+#else
|
||||||
|
+#define NEVER_INLINE
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
--- kdelibs-3.5.4/khtml/html/htmlparser.h.CVE-2009-1690 2005-10-10 17:06:04.000000000 +0200
|
||||||
|
+++ kdelibs-3.5.4/khtml/html/htmlparser.h 2009-06-17 14:42:27.000000000 +0200
|
||||||
|
@@ -38,10 +38,10 @@
|
||||||
|
#include <qdatetime.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-
|
||||||
|
#include "dom/dom_string.h"
|
||||||
|
#include "xml/dom_nodeimpl.h"
|
||||||
|
#include "html/html_documentimpl.h"
|
||||||
|
+#include "html/RefPtr.h"
|
||||||
|
|
||||||
|
class KHTMLView;
|
||||||
|
class HTMLStackElem;
|
||||||
|
@@ -148,7 +148,7 @@
|
||||||
|
/*
|
||||||
|
* the head element. Needed for crappy html which defines <base> after </head>
|
||||||
|
*/
|
||||||
|
- DOM::HTMLHeadElementImpl *head;
|
||||||
|
+ RefPtr<DOM::HTMLHeadElementImpl> head;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* a possible <isindex> element in the head. Compatibility hack for
|
@ -0,0 +1,15 @@
|
|||||||
|
Index: kdecore/kwinmodule.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kwinmodule.cpp.orig
|
||||||
|
+++ kdecore/kwinmodule.cpp
|
||||||
|
@@ -436,7 +436,9 @@ QRect KWinModule::workArea( const QValue
|
||||||
|
if ( strut.bottom > 0 )
|
||||||
|
r.setBottom( r.bottom() - (int) strut.bottom );
|
||||||
|
|
||||||
|
- a = a.intersect(r);
|
||||||
|
+ QRect tmp;
|
||||||
|
+ tmp = a.intersect(r);
|
||||||
|
+ a = tmp;
|
||||||
|
}
|
||||||
|
return a;
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
diff -uNr kdelibs-3.5.1.old/pics/hicolor/index.theme kdelibs-3.5.1/pics/hicolor/index.theme
|
||||||
|
--- kdelibs-3.5.1.old/pics/hicolor/index.theme 2006-01-20 07:53:04.000000000 +0100
|
||||||
|
+++ kdelibs-3.5.1/pics/hicolor/index.theme 2006-04-12 20:18:31.907163700 +0200
|
||||||
|
@@ -314,36 +314,36 @@
|
||||||
|
Type=Threshold
|
||||||
|
|
||||||
|
[scalable/actions]
|
||||||
|
-MinSize=1
|
||||||
|
-Size=128
|
||||||
|
+MinSize=32
|
||||||
|
+Size=48
|
||||||
|
MaxSize=256
|
||||||
|
Context=Actions
|
||||||
|
Type=Scalable
|
||||||
|
|
||||||
|
[scalable/apps]
|
||||||
|
-MinSize=1
|
||||||
|
-Size=128
|
||||||
|
+MinSize=32
|
||||||
|
+Size=48
|
||||||
|
MaxSize=256
|
||||||
|
Context=Applications
|
||||||
|
Type=Scalable
|
||||||
|
|
||||||
|
[scalable/devices]
|
||||||
|
-MinSize=1
|
||||||
|
-Size=128
|
||||||
|
+MinSize=32
|
||||||
|
+Size=48
|
||||||
|
MaxSize=256
|
||||||
|
Context=Devices
|
||||||
|
Type=Scalable
|
||||||
|
|
||||||
|
[scalable/filesystems]
|
||||||
|
-MinSize=1
|
||||||
|
-Size=128
|
||||||
|
+MinSize=32
|
||||||
|
+Size=48
|
||||||
|
MaxSize=256
|
||||||
|
Context=FileSystems
|
||||||
|
Type=Scalable
|
||||||
|
|
||||||
|
[scalable/mimetypes]
|
||||||
|
-MinSize=1
|
||||||
|
-Size=128
|
||||||
|
+MinSize=32
|
||||||
|
+Size=48
|
||||||
|
MaxSize=256
|
||||||
|
Context=MimeTypes
|
||||||
|
Type=Scalable
|
@ -0,0 +1,69 @@
|
|||||||
|
Index: kioslave/http/http.cc
|
||||||
|
===================================================================
|
||||||
|
--- kioslave/http/http.cc.orig
|
||||||
|
+++ kioslave/http/http.cc
|
||||||
|
@@ -1804,9 +1804,11 @@ bool HTTPProtocol::isOffline(const KURL
|
||||||
|
QByteArray reply;
|
||||||
|
|
||||||
|
QDataStream stream(params, IO_WriteOnly);
|
||||||
|
- stream << url.url();
|
||||||
|
|
||||||
|
- if ( dcopClient()->call( "kded", "networkstatus", "status(QString)",
|
||||||
|
+ if ( url.host() == QString::fromLatin1("localhost") || url.host() == QString::fromLatin1("127.0.0.1") || url.host() == QString::fromLatin1("::") ) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ if ( dcopClient()->call( "kded", "networkstatus", "status()",
|
||||||
|
params, replyType, reply ) && (replyType == "int") )
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
@@ -2210,6 +2212,11 @@ bool HTTPProtocol::httpOpen()
|
||||||
|
// Conditional cache hit. (Validate)
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (bCacheOnly && bOffline)
|
||||||
|
+ {
|
||||||
|
+ error( ERR_OFFLINE_MODE, m_request.url.url() );
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
if (bCacheOnly)
|
||||||
|
{
|
||||||
|
error( ERR_DOES_NOT_EXIST, m_request.url.url() );
|
||||||
|
@@ -2217,7 +2224,7 @@ bool HTTPProtocol::httpOpen()
|
||||||
|
}
|
||||||
|
if (bOffline)
|
||||||
|
{
|
||||||
|
- error( ERR_COULD_NOT_CONNECT, m_request.url.url() );
|
||||||
|
+ error( ERR_OFFLINE_MODE, m_request.url.url() );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Index: kio/kio/global.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/global.cpp.orig
|
||||||
|
+++ kio/kio/global.cpp
|
||||||
|
@@ -408,6 +408,9 @@ KIO_EXPORT QString KIO::buildErrorString
|
||||||
|
case KIO::ERR_POST_DENIED:
|
||||||
|
result = i18n( "Access to restricted port in POST denied.");
|
||||||
|
break;
|
||||||
|
+ case KIO::ERR_OFFLINE_MODE:
|
||||||
|
+ result = i18n( "Could not access %1.\nOffline mode active.").arg( errorText );
|
||||||
|
+ break;
|
||||||
|
default:
|
||||||
|
result = i18n( "Unknown error code %1\n%2\nPlease send a full bug report at http://bugs.kde.org." ).arg( errorCode ).arg( errorText );
|
||||||
|
break;
|
||||||
|
Index: kio/kio/global.h
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/global.h.orig
|
||||||
|
+++ kio/kio/global.h
|
||||||
|
@@ -244,8 +244,10 @@ namespace KIO
|
||||||
|
ERR_UPGRADE_REQUIRED = 64, // A transport upgrade is required to access this
|
||||||
|
// object. For instance, TLS is demanded by
|
||||||
|
// the server in order to continue.
|
||||||
|
- ERR_POST_DENIED = 65 // Issued when trying to POST data to a certain Ports
|
||||||
|
+ ERR_POST_DENIED = 65, // Issued when trying to POST data to a certain Ports
|
||||||
|
// see job.cpp
|
||||||
|
+ ERR_OFFLINE_MODE = 66 // Used when an app is in offline mode and a
|
||||||
|
+ // requested document is unavailable.
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
Binary file not shown.
@ -0,0 +1,40 @@
|
|||||||
|
Index: interfaces/kmediaplayer/kfileaudiopreview/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- interfaces/kmediaplayer/kfileaudiopreview/Makefile.am.orig
|
||||||
|
+++ interfaces/kmediaplayer/kfileaudiopreview/Makefile.am
|
||||||
|
@@ -1,11 +1,11 @@
|
||||||
|
-INCLUDES = -I$(top_srcdir)/interfaces/ -I$(top_srcdir)/arts/kde -I$(includedir)/arts $(all_includes)
|
||||||
|
+INCLUDES = -I$(top_srcdir)/interfaces/ $(all_includes)
|
||||||
|
METASOURCES = AUTO
|
||||||
|
|
||||||
|
kde_module_LTLIBRARIES = kfileaudiopreview.la
|
||||||
|
|
||||||
|
kfileaudiopreview_la_SOURCES = kfileaudiopreview.cpp
|
||||||
|
kfileaudiopreview_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module -avoid-version -no-undefined
|
||||||
|
-kfileaudiopreview_la_LIBADD = $(top_builddir)/interfaces/kmediaplayer/libkmediaplayer.la $(top_builddir)/arts/kde/libartskde.la $(LIB_KIO)
|
||||||
|
+kfileaudiopreview_la_LIBADD = $(top_builddir)/interfaces/kmediaplayer/libkmediaplayer.la $(top_builddir)/kdemm/libkdemm.la $(LIB_KIO)
|
||||||
|
|
||||||
|
noinst_HEADERS = kfileaudiopreview.h
|
||||||
|
|
||||||
|
Index: interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
|
||||||
|
===================================================================
|
||||||
|
--- interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp.orig
|
||||||
|
+++ interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
#include <kmimetype.h>
|
||||||
|
#include <kparts/componentfactory.h>
|
||||||
|
|
||||||
|
-#include <kplayobjectfactory.h>
|
||||||
|
+#include <kdemm/factory.h>
|
||||||
|
|
||||||
|
#include <config-kfile.h>
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ KFileAudioPreview::KFileAudioPreview( QW
|
||||||
|
{
|
||||||
|
KGlobal::locale()->insertCatalogue("kfileaudiopreview");
|
||||||
|
|
||||||
|
- QStringList formats = KDE::PlayObjectFactory::mimeTypes();
|
||||||
|
+ QStringList formats = KDE::Multimedia::Factory::self()->playableMimeTypes();
|
||||||
|
// ###
|
||||||
|
QStringList::ConstIterator it = formats.begin();
|
||||||
|
for ( ; it != formats.end(); ++it )
|
@ -0,0 +1,669 @@
|
|||||||
|
Index: arts/knotify/knotify.cpp
|
||||||
|
===================================================================
|
||||||
|
--- arts/knotify/knotify.cpp.orig
|
||||||
|
+++ arts/knotify/knotify.cpp
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
2000 Matthias Ettrich (ettrich@kde.org)
|
||||||
|
2000 Waldo Bastian <bastian@kde.org>
|
||||||
|
2000-2003 Carsten Pfeiffer <pfeiffer@kde.org>
|
||||||
|
+ 2004 Allan Sandfeld Jensen <kde@carewolf.com>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@@ -26,21 +27,12 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
-#include <config.h>
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
-// aRts headers
|
||||||
|
-#include <connect.h>
|
||||||
|
-#include <dispatcher.h>
|
||||||
|
-#include <flowsystem.h>
|
||||||
|
-#include <qiomanager.h>
|
||||||
|
-#include <soundserver.h>
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
// QT headers
|
||||||
|
#include <qfile.h>
|
||||||
|
#include <qfileinfo.h>
|
||||||
|
#include <qstringlist.h>
|
||||||
|
#include <qtextstream.h>
|
||||||
|
+#include <qtimer.h>
|
||||||
|
|
||||||
|
// KDE headers
|
||||||
|
#include <dcopclient.h>
|
||||||
|
@@ -80,15 +72,11 @@ public:
|
||||||
|
QString externalPlayer;
|
||||||
|
KProcess *externalPlayerProc;
|
||||||
|
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- QPtrList<KDE::PlayObject> playObjects;
|
||||||
|
- QMap<KDE::PlayObject*,int> playObjectEventMap;
|
||||||
|
- KAudioManagerPlay *audioManager;
|
||||||
|
-#endif
|
||||||
|
+ QMap<KDE::Multimedia::SimplePlayer*,int> playObjectEventMap;
|
||||||
|
int externalPlayerEventId;
|
||||||
|
|
||||||
|
bool useExternal;
|
||||||
|
- bool useArts;
|
||||||
|
+ bool useKDEMM;
|
||||||
|
int volume;
|
||||||
|
QTimer *playTimer;
|
||||||
|
bool inStartup;
|
||||||
|
@@ -106,12 +94,13 @@ extern "C"{
|
||||||
|
KDE_EXPORT int kdemain(int argc, char **argv)
|
||||||
|
{
|
||||||
|
KAboutData aboutdata("knotify", I18N_NOOP("KNotify"),
|
||||||
|
- "3.0", I18N_NOOP("KDE Notification Server"),
|
||||||
|
+ "4.0", I18N_NOOP("KDE Notification Server"),
|
||||||
|
KAboutData::License_GPL, "(C) 1997-2003, KDE Developers");
|
||||||
|
aboutdata.addAuthor("Carsten Pfeiffer",I18N_NOOP("Current Maintainer"),"pfeiffer@kde.org");
|
||||||
|
aboutdata.addAuthor("Christian Esken",0,"esken@kde.org");
|
||||||
|
aboutdata.addAuthor("Stefan Westerfeld",I18N_NOOP("Sound support"),"stefan@space.twc.de");
|
||||||
|
aboutdata.addAuthor("Charles Samuels",I18N_NOOP("Previous Maintainer"),"charles@kde.org");
|
||||||
|
+ aboutdata.addAuthor("Allan Sandfeld Jensen",I18N_NOOP("Conversion to KDEMM"),"kde@carewolf.com");
|
||||||
|
|
||||||
|
KCmdLineArgs::init( argc, argv, &aboutdata );
|
||||||
|
KUniqueApplication::addCmdLineOptions();
|
||||||
|
@@ -126,145 +115,36 @@ KDE_EXPORT int kdemain(int argc, char **
|
||||||
|
KUniqueApplication app;
|
||||||
|
app.disableSessionManagement();
|
||||||
|
|
||||||
|
- // KNotify is started on KDE startup and on demand (using
|
||||||
|
- // KNotifClient::startDaemon()) whenever a KNotify event occurs. Especially
|
||||||
|
- // KWin may fire many events (e.g. when a window pops up). When we have
|
||||||
|
- // problems with aRts or the installation, we might get an infinite loop
|
||||||
|
- // of knotify crashing, popping up the crashhandler window and kwin firing
|
||||||
|
- // another event, starting knotify again...
|
||||||
|
- // We try to prevent this by tracking our startup and offer options to
|
||||||
|
- // abort this.
|
||||||
|
-
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- KConfigGroup config( KGlobal::config(), "StartProgress" );
|
||||||
|
- KConfig artsKCMConfig( "kcmartsrc" );
|
||||||
|
- artsKCMConfig.setGroup( "Arts" );
|
||||||
|
- bool useArts = artsKCMConfig.readBoolEntry( "StartServer", true );
|
||||||
|
- if (useArts)
|
||||||
|
- useArts = config.readBoolEntry( "Use Arts", useArts );
|
||||||
|
- bool ok = config.readBoolEntry( "Arts Init", true );
|
||||||
|
-
|
||||||
|
- if ( useArts && !ok )
|
||||||
|
- {
|
||||||
|
- if ( KMessageBox::questionYesNo(
|
||||||
|
- 0L,
|
||||||
|
- i18n("During the previous startup, KNotify crashed while creating "
|
||||||
|
- "Arts::Dispatcher. Do you want to try again or disable "
|
||||||
|
- "aRts sound output?\n\n"
|
||||||
|
- "If you choose to disable aRts output now, you can re-enable "
|
||||||
|
- "it later or select an alternate sound player "
|
||||||
|
- "in the System Notifications control panel."),
|
||||||
|
- i18n("KNotify Problem"),
|
||||||
|
- i18n("&Try Again"),
|
||||||
|
- i18n("D&isable aRts Output"),
|
||||||
|
- "KNotifyStartProgress",
|
||||||
|
- 0 /* don't call KNotify :) */
|
||||||
|
- )
|
||||||
|
- == KMessageBox::No )
|
||||||
|
- {
|
||||||
|
- useArts = false;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // when ArtsDispatcher crashes, we know it the next start.
|
||||||
|
- config.writeEntry( "Arts Init", false );
|
||||||
|
- config.writeEntry( "Use Arts", useArts );
|
||||||
|
- config.sync();
|
||||||
|
-
|
||||||
|
- KArtsDispatcher *dispatcher = 0;
|
||||||
|
- if ( useArts )
|
||||||
|
- {
|
||||||
|
- dispatcher = new KArtsDispatcher;
|
||||||
|
- soundServer = new KArtsServer;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // ok, seemed to work.
|
||||||
|
- config.writeEntry("Arts Init", useArts );
|
||||||
|
- config.sync();
|
||||||
|
-
|
||||||
|
- ok = config.readBoolEntry( "KNotify Init", true );
|
||||||
|
- if ( useArts && !ok )
|
||||||
|
- {
|
||||||
|
- if ( KMessageBox::questionYesNo(
|
||||||
|
- 0L,
|
||||||
|
- i18n("During the previous startup, KNotify crashed while instantiating "
|
||||||
|
- "KNotify. Do you want to try again or disable "
|
||||||
|
- "aRts sound output?\n\n"
|
||||||
|
- "If you choose to disable aRts output now, you can re-enable "
|
||||||
|
- "it later or select an alternate sound player "
|
||||||
|
- "in the System Notifications control panel."),
|
||||||
|
- i18n("KNotify Problem"),
|
||||||
|
- i18n("&Try Again"),
|
||||||
|
- i18n("D&isable aRts Output"),
|
||||||
|
- "KNotifyStartProgress",
|
||||||
|
- 0 /* don't call KNotify :) */
|
||||||
|
- )
|
||||||
|
- == KMessageBox::No )
|
||||||
|
- {
|
||||||
|
- useArts = false;
|
||||||
|
- delete soundServer;
|
||||||
|
- soundServer = 0L;
|
||||||
|
- delete dispatcher;
|
||||||
|
- dispatcher = 0L;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // when KNotify instantiation crashes, we know it the next start.
|
||||||
|
- config.writeEntry( "KNotify Init", false );
|
||||||
|
- config.writeEntry( "Use Arts", useArts );
|
||||||
|
- config.sync();
|
||||||
|
-
|
||||||
|
// start notify service
|
||||||
|
- KNotify *notify = new KNotify( useArts );
|
||||||
|
-
|
||||||
|
- config.writeEntry( "KNotify Init", true );
|
||||||
|
- config.sync();
|
||||||
|
-
|
||||||
|
-#else
|
||||||
|
-
|
||||||
|
- // start notify service, without aRts
|
||||||
|
- KNotify *notify = new KNotify( false );
|
||||||
|
-
|
||||||
|
-#endif
|
||||||
|
+ KNotify notify( true );
|
||||||
|
|
||||||
|
app.dcopClient()->setDefaultObject( "Notify" );
|
||||||
|
app.dcopClient()->setDaemonMode( true );
|
||||||
|
// kdDebug() << "knotify starting" << endl;
|
||||||
|
|
||||||
|
int ret = app.exec();
|
||||||
|
- delete notify;
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- delete soundServer;
|
||||||
|
- delete dispatcher;
|
||||||
|
-#endif
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}// end extern "C"
|
||||||
|
|
||||||
|
-KNotify::KNotify( bool useArts )
|
||||||
|
+KNotify::KNotify( bool useKDEMM )
|
||||||
|
: QObject(), DCOPObject("Notify")
|
||||||
|
{
|
||||||
|
d = new KNotifyPrivate;
|
||||||
|
d->globalEvents = new KConfig("knotify/eventsrc", true, false, "data");
|
||||||
|
d->globalConfig = new KConfig("knotify.eventsrc", true, false);
|
||||||
|
d->externalPlayerProc = 0;
|
||||||
|
- d->useArts = useArts;
|
||||||
|
- d->inStartup = true;
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- d->playObjects.setAutoDelete(true);
|
||||||
|
- d->audioManager = 0;
|
||||||
|
- if( useArts )
|
||||||
|
- {
|
||||||
|
- connect( soundServer, SIGNAL( restartedServer() ), this, SLOT( restartedArtsd() ) );
|
||||||
|
- restartedArtsd(); //started allready need to initialize d->audioManager
|
||||||
|
- }
|
||||||
|
-#endif
|
||||||
|
+ d->useKDEMM = useKDEMM;
|
||||||
|
|
||||||
|
- d->volume = 100;
|
||||||
|
+ d->inStartup = 0;
|
||||||
|
+ d->volume = 100;
|
||||||
|
|
||||||
|
d->playTimer = 0;
|
||||||
|
|
||||||
|
loadConfig();
|
||||||
|
+
|
||||||
|
+ connect ( this, SIGNAL(deletePlayObject(KDE::Multimedia::SimplePlayer*)),
|
||||||
|
+ SLOT(objectDeleter(KDE::Multimedia::SimplePlayer*)) );
|
||||||
|
}
|
||||||
|
|
||||||
|
KNotify::~KNotify()
|
||||||
|
@@ -272,12 +152,9 @@ KNotify::~KNotify()
|
||||||
|
reconfigure();
|
||||||
|
|
||||||
|
#ifndef WITHOUT_ARTS
|
||||||
|
- d->playObjects.clear();
|
||||||
|
-
|
||||||
|
delete d->globalEvents;
|
||||||
|
delete d->globalConfig;
|
||||||
|
delete d->externalPlayerProc;
|
||||||
|
- delete d->audioManager;
|
||||||
|
#endif
|
||||||
|
delete d;
|
||||||
|
}
|
||||||
|
@@ -293,7 +170,7 @@ void KNotify::loadConfig() {
|
||||||
|
// try to locate a suitable player if none is configured
|
||||||
|
if ( d->externalPlayer.isEmpty() ) {
|
||||||
|
QStringList players;
|
||||||
|
- players << "wavplay" << "aplay" << "auplay";
|
||||||
|
+ players << "wavplay" << "aplay" << "auplay" << "artsplay" << "akodeplay";
|
||||||
|
QStringList::Iterator it = players.begin();
|
||||||
|
while ( d->externalPlayer.isEmpty() && it != players.end() ) {
|
||||||
|
d->externalPlayer = KStandardDirs::findExe( *it );
|
||||||
|
@@ -456,9 +333,9 @@ bool KNotify::notifyBySound( const QStri
|
||||||
|
if ( soundFile.isEmpty() )
|
||||||
|
soundFile = locate( "sound", sound );
|
||||||
|
}
|
||||||
|
- if ( soundFile.isEmpty() || isPlaying( soundFile ) )
|
||||||
|
+ if ( soundFile.isEmpty() )
|
||||||
|
{
|
||||||
|
- soundFinished( eventId, soundFile.isEmpty() ? NoSoundFile : FileAlreadyPlaying );
|
||||||
|
+ soundFinished( eventId, NoSoundFile );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -466,64 +343,18 @@ bool KNotify::notifyBySound( const QStri
|
||||||
|
// kdDebug() << "KNotify::notifyBySound - trying to play file " << soundFile << endl;
|
||||||
|
|
||||||
|
if (!external) {
|
||||||
|
- //If we disabled using aRts, just return,
|
||||||
|
- //(If we don't, we'll blow up accessing the null soundServer)
|
||||||
|
- if (!d->useArts)
|
||||||
|
+ //If we disabled audio, just return,
|
||||||
|
+ if (!d->useKDEMM)
|
||||||
|
{
|
||||||
|
soundFinished( eventId, NoSoundSupport );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- // play sound finally
|
||||||
|
- while( d->playObjects.count()>5 )
|
||||||
|
- abortFirstPlayObject();
|
||||||
|
-
|
||||||
|
- KDE::PlayObjectFactory factory(soundServer->server());
|
||||||
|
- if( d->audioManager )
|
||||||
|
- factory.setAudioManagerPlay( d->audioManager );
|
||||||
|
KURL soundURL;
|
||||||
|
soundURL.setPath(soundFile);
|
||||||
|
- KDE::PlayObject *playObject = factory.createPlayObject(soundURL, false);
|
||||||
|
-
|
||||||
|
- if (playObject->isNull())
|
||||||
|
- {
|
||||||
|
- soundFinished( eventId, NoSoundSupport );
|
||||||
|
- delete playObject;
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if ( d->volume != 100 )
|
||||||
|
- {
|
||||||
|
- // It works to access the playObject immediately because we don't allow
|
||||||
|
- // non-file URLs for sounds.
|
||||||
|
- Arts::StereoVolumeControl volumeControl = Arts::DynamicCast(soundServer->server().createObject("Arts::StereoVolumeControl"));
|
||||||
|
- Arts::PlayObject player = playObject->object();
|
||||||
|
- Arts::Synth_AMAN_PLAY ap = d->audioManager->amanPlay();
|
||||||
|
- if( ! volumeControl.isNull() && ! player.isNull() && ! ap.isNull() )
|
||||||
|
- {
|
||||||
|
- volumeControl.scaleFactor( d->volume/100.0 );
|
||||||
|
-
|
||||||
|
- ap.stop();
|
||||||
|
- Arts::disconnect( player, "left", ap, "left" );
|
||||||
|
- Arts::disconnect( player, "right", ap, "right" );
|
||||||
|
-
|
||||||
|
- ap.start();
|
||||||
|
- volumeControl.start();
|
||||||
|
-
|
||||||
|
- Arts::connect(player,"left",volumeControl,"inleft");
|
||||||
|
- Arts::connect(player,"right",volumeControl,"inright");
|
||||||
|
-
|
||||||
|
- Arts::connect(volumeControl,"outleft",ap,"left");
|
||||||
|
- Arts::connect(volumeControl,"outright",ap,"right");
|
||||||
|
-
|
||||||
|
- player._addChild( volumeControl, "volume" );
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- playObject->play();
|
||||||
|
- d->playObjects.append( playObject );
|
||||||
|
+ KDE::Multimedia::SimplePlayer* playObject = new KDE::Multimedia::SimplePlayer( this );
|
||||||
|
d->playObjectEventMap.insert( playObject, eventId );
|
||||||
|
+ playObject->play( soundURL );
|
||||||
|
|
||||||
|
if ( !d->playTimer )
|
||||||
|
{
|
||||||
|
@@ -532,8 +363,7 @@ bool KNotify::notifyBySound( const QStri
|
||||||
|
}
|
||||||
|
if ( !d->playTimer->isActive() )
|
||||||
|
d->playTimer->start( 1000 );
|
||||||
|
-#endif
|
||||||
|
- return true;
|
||||||
|
+ return playObject->isPlaying();
|
||||||
|
|
||||||
|
} else if(!d->externalPlayer.isEmpty()) {
|
||||||
|
// use an external player to play the sound
|
||||||
|
@@ -686,58 +516,39 @@ void KNotify::setVolume( int volume )
|
||||||
|
d->volume = volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
+void KNotify::slotPlayerProcessExited( KProcess *proc )
|
||||||
|
+{
|
||||||
|
+ soundFinished( d->externalPlayerEventId,
|
||||||
|
+ (proc->normalExit() && proc->exitStatus() == 0) ? PlayedOK : Unknown );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
void KNotify::playTimeout()
|
||||||
|
{
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- for ( QPtrListIterator< KDE::PlayObject > it(d->playObjects); *it;)
|
||||||
|
+qDebug("KNotify::playTimeout");
|
||||||
|
+ for( QMap< KDE::Multimedia::SimplePlayer*, int >::Iterator it = d->playObjectEventMap.begin();
|
||||||
|
+ it != d->playObjectEventMap.end();
|
||||||
|
+ )
|
||||||
|
{
|
||||||
|
- QPtrListIterator< KDE::PlayObject > current = it;
|
||||||
|
+ QMap< KDE::Multimedia::SimplePlayer*, int >::Iterator current = it;
|
||||||
|
++it;
|
||||||
|
- if ( (*current)->state() != Arts::posPlaying )
|
||||||
|
+ KDE::Multimedia::SimplePlayer* playObject = current.key();
|
||||||
|
+ if ( !playObject->isPlaying() || playObject->totalTime() <= 0 ) // may be "playing" even if there's an error
|
||||||
|
{
|
||||||
|
- QMap<KDE::PlayObject*,int>::Iterator eit = d->playObjectEventMap.find( *current );
|
||||||
|
- if ( eit != d->playObjectEventMap.end() )
|
||||||
|
- {
|
||||||
|
- soundFinished( *eit, PlayedOK );
|
||||||
|
- d->playObjectEventMap.remove( eit );
|
||||||
|
- }
|
||||||
|
- d->playObjects.remove( current );
|
||||||
|
+ soundFinished( *current, PlayedOK );
|
||||||
|
+ d->playObjectEventMap.remove( current );
|
||||||
|
+ disconnect( playObject, SIGNAL( finished() ) );
|
||||||
|
+ playObject->stop();
|
||||||
|
+ emit deletePlayObject(playObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- if ( !d->playObjects.count() )
|
||||||
|
+ if ( !d->playObjectEventMap.count() )
|
||||||
|
d->playTimer->stop();
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
-bool KNotify::isPlaying( const QString& soundFile ) const
|
||||||
|
+void KNotify::objectDeleter( KDE::Multimedia::SimplePlayer *playObject )
|
||||||
|
{
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- for ( QPtrListIterator< KDE::PlayObject > it(d->playObjects); *it; ++it)
|
||||||
|
- {
|
||||||
|
- if ( (*it)->mediaName() == soundFile )
|
||||||
|
- return true;
|
||||||
|
- }
|
||||||
|
-#endif
|
||||||
|
- return false;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-void KNotify::slotPlayerProcessExited( KProcess *proc )
|
||||||
|
-{
|
||||||
|
- soundFinished( d->externalPlayerEventId,
|
||||||
|
- (proc->normalExit() && proc->exitStatus() == 0) ? PlayedOK : Unknown );
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-void KNotify::abortFirstPlayObject()
|
||||||
|
-{
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- QMap<KDE::PlayObject*,int>::Iterator it = d->playObjectEventMap.find( d->playObjects.getFirst() );
|
||||||
|
- if ( it != d->playObjectEventMap.end() )
|
||||||
|
- {
|
||||||
|
- soundFinished( it.data(), Aborted );
|
||||||
|
- d->playObjectEventMap.remove( it );
|
||||||
|
- }
|
||||||
|
- d->playObjects.removeFirst();
|
||||||
|
-#endif
|
||||||
|
+ delete playObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KNotify::soundFinished( int eventId, PlayingFinishedStatus reason )
|
||||||
|
@@ -780,16 +591,6 @@ WId KNotify::checkWinId( const QString &
|
||||||
|
return senderWinId;
|
||||||
|
}
|
||||||
|
|
||||||
|
-void KNotify::restartedArtsd()
|
||||||
|
-{
|
||||||
|
-#ifndef WITHOUT_ARTS
|
||||||
|
- delete d->audioManager;
|
||||||
|
- d->audioManager = new KAudioManagerPlay( soundServer );
|
||||||
|
- d->audioManager->setTitle( i18n( "KDE System Notifications" ) );
|
||||||
|
- d->audioManager->setAutoRestoreID( "KNotify Aman Play" );
|
||||||
|
-#endif
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
void KNotify::sessionReady()
|
||||||
|
{
|
||||||
|
if( d->inStartup && !d->startupEvents.isEmpty())
|
||||||
|
Index: arts/knotify/knotify.h
|
||||||
|
===================================================================
|
||||||
|
--- arts/knotify/knotify.h.orig
|
||||||
|
+++ arts/knotify/knotify.h
|
||||||
|
@@ -24,9 +24,10 @@
|
||||||
|
#include <knotifyclient.h>
|
||||||
|
#include <dcopobject.h>
|
||||||
|
|
||||||
|
+#include <kdemm/simpleplayer.h>
|
||||||
|
+
|
||||||
|
class KNotifyPrivate;
|
||||||
|
class KProcess;
|
||||||
|
-class KConfig;
|
||||||
|
|
||||||
|
class KNotify : public QObject, public DCOPObject
|
||||||
|
{
|
||||||
|
@@ -76,19 +77,16 @@ private:
|
||||||
|
bool notifyByStderr(const QString &text);
|
||||||
|
bool notifyByPassivePopup(const QString &text, const QString &appName,
|
||||||
|
KConfig* eventsFile, WId winId );
|
||||||
|
- bool notifyByExecute(const QString &command,
|
||||||
|
- const QString& event,
|
||||||
|
- const QString& fromApp,
|
||||||
|
+ bool notifyByExecute(const QString &command,
|
||||||
|
+ const QString& event,
|
||||||
|
+ const QString& fromApp,
|
||||||
|
const QString& text,
|
||||||
|
int winId,
|
||||||
|
int eventId );
|
||||||
|
- bool notifyByTaskbar( WId winId );
|
||||||
|
-
|
||||||
|
- bool isPlaying( const QString& soundFile ) const;
|
||||||
|
-
|
||||||
|
- void soundFinished( int eventId, PlayingFinishedStatus reason );
|
||||||
|
- void abortFirstPlayObject();
|
||||||
|
-
|
||||||
|
+ bool notifyByTaskbar( WId winId );
|
||||||
|
+
|
||||||
|
+ void soundFinished( int eventId, PlayingFinishedStatus reason );
|
||||||
|
+
|
||||||
|
WId checkWinId( const QString& appName, WId senderWinId );
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -97,9 +95,13 @@ private:
|
||||||
|
bool isGlobal(const QString &eventname);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
- void playTimeout();
|
||||||
|
- void slotPlayerProcessExited( KProcess *proc );
|
||||||
|
- void restartedArtsd();
|
||||||
|
+ void playTimeout();
|
||||||
|
+ void slotPlayerProcessExited( KProcess *proc );
|
||||||
|
+ void objectDeleter( KDE::Multimedia::SimplePlayer* );
|
||||||
|
+
|
||||||
|
+signals:
|
||||||
|
+ void deletePlayObject( KDE::Multimedia::SimplePlayer* );
|
||||||
|
+
|
||||||
|
|
||||||
|
private:
|
||||||
|
KNotifyPrivate* d;
|
||||||
|
Index: arts/knotify/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- arts/knotify/Makefile.am.orig
|
||||||
|
+++ arts/knotify/Makefile.am
|
||||||
|
@@ -3,12 +3,13 @@ INCLUDES= -I$(top_srcdir)/arts/kde -I$(i
|
||||||
|
|
||||||
|
####### Files
|
||||||
|
|
||||||
|
-kde_module_LTLIBRARIES = knotify.la
|
||||||
|
+#kde_module_LTLIBRARIES = knotify.la
|
||||||
|
+bin_PROGRAMS =
|
||||||
|
+lib_LTLIBRARIES =
|
||||||
|
+kdeinit_LTLIBRARIES = knotify.la
|
||||||
|
|
||||||
|
knotify_la_SOURCES = knotify.cpp knotify.skel
|
||||||
|
-if include_ARTS
|
||||||
|
-knotify_la_LIBADD = -lsoundserver_idl -lqtmcop $(LIB_KDEUI) $(top_builddir)/arts/kde/libartskde.la
|
||||||
|
-endif
|
||||||
|
+knotify_la_LIBADD = $(LIB_KDEUI) $(top_builddir)/kdemm/libkdemm.la
|
||||||
|
knotify_la_LDFLAGS = $(all_libraries) -module -avoid-version
|
||||||
|
knotify_la_METASOURCES = AUTO
|
||||||
|
|
||||||
|
Index: kdemm/channel.h
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/channel.h.orig
|
||||||
|
+++ kdemm/channel.h
|
||||||
|
@@ -83,7 +83,7 @@ namespace Multimedia
|
||||||
|
* You can not instantiate channels yourself, use the Factory to
|
||||||
|
* create them.
|
||||||
|
*/
|
||||||
|
- Channel( const QString & name, const QString & type, Direction direction,
|
||||||
|
+ Channel( const QString & channelName, const QString & type, Direction direction,
|
||||||
|
QObject * parent = 0, const char * name = 0 );
|
||||||
|
|
||||||
|
private:
|
||||||
|
Index: kdemm/factory.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/factory.cpp.orig
|
||||||
|
+++ kdemm/factory.cpp
|
||||||
|
@@ -80,6 +80,7 @@ class Factory::Private
|
||||||
|
":\n" << e << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#if 0
|
||||||
|
if( 0 == backend )
|
||||||
|
{
|
||||||
|
if( offers.size() == 0 )
|
||||||
|
@@ -100,6 +101,7 @@ class Factory::Private
|
||||||
|
i18n( "Unable to use any of the available Multimedia Backends" ), details );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
Backend * backend;
|
||||||
|
Index: kdemm/simpleplayer.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdemm/simpleplayer.cpp.orig
|
||||||
|
+++ kdemm/simpleplayer.cpp
|
||||||
|
@@ -50,10 +50,12 @@ SimplePlayer::SimplePlayer( QObject * pa
|
||||||
|
connect( Factory::self(), SIGNAL( recreateObjects() ), SLOT( recreateObjects() ) );
|
||||||
|
d->channel = Factory::self()->createChannel( KGlobal::instance()->aboutData()->programName() );
|
||||||
|
d->player = Factory::self()->createPlayer();
|
||||||
|
- d->player->setOutputChannel( d->channel );
|
||||||
|
- connect( d->player, SIGNAL( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ),
|
||||||
|
+ if ( d->player ) {
|
||||||
|
+ d->player->setOutputChannel( d->channel );
|
||||||
|
+ connect( d->player, SIGNAL( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ),
|
||||||
|
SLOT( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ) );
|
||||||
|
- connect( d->player, SIGNAL( finished() ), SIGNAL( finished() ) );
|
||||||
|
+ connect( d->player, SIGNAL( finished() ), SIGNAL( finished() ) );
|
||||||
|
+ };
|
||||||
|
}
|
||||||
|
|
||||||
|
SimplePlayer::~SimplePlayer()
|
||||||
|
@@ -64,6 +66,8 @@ SimplePlayer::~SimplePlayer()
|
||||||
|
|
||||||
|
void SimplePlayer::play( const KURL & url )
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return;
|
||||||
|
if( isPaused() && url == d->url )
|
||||||
|
{
|
||||||
|
d->player->play();
|
||||||
|
@@ -78,51 +82,71 @@ void SimplePlayer::play( const KURL & ur
|
||||||
|
|
||||||
|
void SimplePlayer::pause()
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return;
|
||||||
|
d->player->pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimplePlayer::stop()
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return;
|
||||||
|
d->player->stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
long SimplePlayer::totalTime() const
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return 0;
|
||||||
|
return d->player->totalTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
long SimplePlayer::currentTime() const
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return 0;
|
||||||
|
return d->player->currentTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimplePlayer::seek( long ms )
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return;
|
||||||
|
d->player->seek( ms );
|
||||||
|
}
|
||||||
|
|
||||||
|
float SimplePlayer::volume() const
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return 0;
|
||||||
|
return d->channel->volume();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimplePlayer::setVolume( float v )
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return;
|
||||||
|
d->channel->setVolume( v );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SimplePlayer::isPlaying() const
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return false;
|
||||||
|
return ( d->player->state() == Player::Playing );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SimplePlayer::isPaused() const
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return false;
|
||||||
|
return ( d->player->state() == Player::Paused );
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimplePlayer::stateChanged( Player::State ns, Player::State os )
|
||||||
|
{
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return;
|
||||||
|
if( os == Player::Loading && ns == Player::Stopped )
|
||||||
|
d->player->play();
|
||||||
|
}
|
||||||
|
@@ -135,7 +159,8 @@ void SimplePlayer::deleteYourObjects()
|
||||||
|
d->title = d->channel->channelName();
|
||||||
|
d->type = d->channel->channelType();
|
||||||
|
|
||||||
|
- d->player->stop();
|
||||||
|
+ if( d->player )
|
||||||
|
+ d->player->stop();
|
||||||
|
|
||||||
|
delete d->player;
|
||||||
|
delete d->channel;
|
||||||
|
@@ -149,6 +174,9 @@ void SimplePlayer::recreateObjects()
|
||||||
|
d->channel->setVolume( d->channelvolume );
|
||||||
|
|
||||||
|
d->player = Factory::self()->createPlayer();
|
||||||
|
+ if( ! d->player )
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
d->player->setOutputChannel( d->channel );
|
||||||
|
|
||||||
|
if( d->state != Player::NoMedia )
|
@ -0,0 +1,32 @@
|
|||||||
|
Index: kdeprint/cups/cupsdconf2/cupsddialog.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeprint/cups/cupsdconf2/cupsddialog.cpp.orig
|
||||||
|
+++ kdeprint/cups/cupsdconf2/cupsddialog.cpp
|
||||||
|
@@ -45,6 +45,7 @@
|
||||||
|
#include <kguiitem.h>
|
||||||
|
#include <kprocess.h>
|
||||||
|
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <cups/cups.h>
|
||||||
|
|
||||||
|
@@ -205,15 +206,13 @@ bool CupsdDialog::restartServer(QString&
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
+ KProcess proc;
|
||||||
|
bool success = false;
|
||||||
|
if (getuid() == 0 )
|
||||||
|
- success = (::kill(serverPid, SIGHUP) == 0);
|
||||||
|
+ proc << "rccups" << "force-reload";
|
||||||
|
else
|
||||||
|
- {
|
||||||
|
- KProcess proc;
|
||||||
|
- proc << "kdesu" << "-c" << "kill -SIGHUP " + QString::number( serverPid );
|
||||||
|
- success = proc.start( KProcess::Block ) && proc.normalExit();
|
||||||
|
- }
|
||||||
|
+ proc << "kdesu" << "-c" << "rccups" << "force-reload";
|
||||||
|
+ success = proc.start( KProcess::Block ) && proc.normalExit();
|
||||||
|
if( !success )
|
||||||
|
msg = i18n("Unable to restart CUPS server (pid = %1)").arg(serverPid);
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: kdeprint/cups/kmcupsmanager.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeprint/cups/kmcupsmanager.cpp.orig
|
||||||
|
+++ kdeprint/cups/kmcupsmanager.cpp
|
||||||
|
@@ -85,7 +85,7 @@ static int trials = 5;
|
||||||
|
// change LANG variable so that CUPS is always using
|
||||||
|
// english language: translation may only come from the PPD
|
||||||
|
// itself, or from KDE.
|
||||||
|
- setenv("LANG", "en", 1);
|
||||||
|
+ setenv("LANG", "en_US.UTF-8", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
KMCupsManager::~KMCupsManager()
|
@ -0,0 +1,50 @@
|
|||||||
|
Subject: Change kdesu settings
|
||||||
|
From: Lubos Lunak
|
||||||
|
Bug: 216796
|
||||||
|
Relates: kdelibs4/kdesu-settings.diff
|
||||||
|
Patch-upstream: never
|
||||||
|
|
||||||
|
Change kdesu(d) password keeping timeout only to 5 minutes and enable
|
||||||
|
it by default (to match kdesu using sudo in 10.3 behaviour).
|
||||||
|
KDE3 needs a hack in KPasswordDialog for enabling it by default.
|
||||||
|
|
||||||
|
Update: Change the timeout back to 2 hours (bnc#404521).
|
||||||
|
|
||||||
|
Index: kdesu/defaults.h
|
||||||
|
===================================================================
|
||||||
|
--- kdesu/defaults.h.orig
|
||||||
|
+++ kdesu/defaults.h
|
||||||
|
@@ -13,8 +13,9 @@
|
||||||
|
#ifndef __Defaults_h_included__
|
||||||
|
#define __Defaults_h_included__
|
||||||
|
|
||||||
|
+/*const int defTimeout = 120*60;*/
|
||||||
|
const int defTimeout = 120*60;
|
||||||
|
const int defEchoMode = 0;
|
||||||
|
-const int defKeep = false;
|
||||||
|
+const int defKeep = true;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Index: kdeui/kpassdlg.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kpassdlg.cpp.orig
|
||||||
|
+++ kdeui/kpassdlg.cpp
|
||||||
|
@@ -49,6 +49,8 @@
|
||||||
|
|
||||||
|
#include "kpassdlg.h"
|
||||||
|
|
||||||
|
+#include "../kdesu/defaults.h"
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Password line editor.
|
||||||
|
*/
|
||||||
|
@@ -337,7 +339,8 @@ void KPasswordDialog::init()
|
||||||
|
|
||||||
|
KConfig* const cfg = KGlobal::config();
|
||||||
|
const KConfigGroupSaver saver(cfg, "Passwords");
|
||||||
|
- if (m_Keep && cfg->readBoolEntry("Keep", false))
|
||||||
|
+ bool def = ( qstrcmp( qAppName(), "kdesu" ) == 0 ? defKeep : false );
|
||||||
|
+ if (m_Keep && cfg->readBoolEntry("Keep", def))
|
||||||
|
++m_Keep;
|
||||||
|
|
||||||
|
m_pMain = new QWidget(this);
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: kdecore/kdeversion.h
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kdeversion.h.orig
|
||||||
|
+++ kdecore/kdeversion.h
|
||||||
|
@@ -33,6 +33,8 @@
|
||||||
|
|
||||||
|
#define KDE_IS_VERSION(a,b,c) ( KDE_VERSION >= KDE_MAKE_VERSION(a,b,c) )
|
||||||
|
|
||||||
|
+#define KDELIBS_SUSE
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Namespace for general KDE functions.
|
||||||
|
*/
|
@ -0,0 +1,42 @@
|
|||||||
|
Index: kio/kfile/kurlbar.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kfile/kurlbar.cpp.orig
|
||||||
|
+++ kio/kfile/kurlbar.cpp
|
||||||
|
@@ -605,8 +605,19 @@ void KURLBar::readItem( int i, KConfig *
|
||||||
|
if ( !url.isValid() || !KProtocolInfo::isKnownProtocol( url ))
|
||||||
|
return; // nothing we could do.
|
||||||
|
|
||||||
|
+ QString description = config->readEntry( QString("Description_") + number );
|
||||||
|
+
|
||||||
|
+ if (description.isEmpty() && url.protocol()=="beagle") {
|
||||||
|
+ KIO::UDSEntry uds;
|
||||||
|
+ const KURL kurl("beagle:?beagled-status");
|
||||||
|
+ if (!KIO::NetAccess::stat(kurl, uds))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ description = i18n("Desktop Search");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
insertItem( url,
|
||||||
|
- config->readEntry( QString("Description_") + number ),
|
||||||
|
+ description,
|
||||||
|
applicationLocal,
|
||||||
|
config->readEntry( QString("Icon_") + number ),
|
||||||
|
static_cast<KIcon::Group>(
|
||||||
|
Index: kio/kfile/kfiledialog.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kfile/kfiledialog.cpp.orig
|
||||||
|
+++ kio/kfile/kfiledialog.cpp
|
||||||
|
@@ -1165,6 +1165,12 @@ void KFileDialog::urlEntered(const KURL&
|
||||||
|
d->pathCombo->setURL( url );
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (url.protocol()=="beagle" && url.path()=="/") {
|
||||||
|
+ d->pathCombo->setEditText("beagle:/<"+i18n("search term")+">");
|
||||||
|
+ d->pathCombo->lineEdit()->setSelection(8,255);
|
||||||
|
+ d->pathCombo->setFocus();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
locationEdit->blockSignals( true );
|
||||||
|
locationEdit->setCurrentItem( 0 );
|
||||||
|
if ( d->keepLocation )
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: interfaces/kimproxy/library/kimproxy.cpp
|
||||||
|
===================================================================
|
||||||
|
--- interfaces/kimproxy/library/kimproxy.cpp.orig
|
||||||
|
+++ interfaces/kimproxy/library/kimproxy.cpp
|
||||||
|
@@ -204,7 +204,7 @@ KIMProxy::KIMProxy( DCOPClient* dc ) : D
|
||||||
|
|
||||||
|
// FIXME: make this work when the sender object id is set to KIMIFace
|
||||||
|
if ( !connectDCOPSignal( 0, 0, method, method, false ) )
|
||||||
|
- KMessageBox::information( 0, QString( "Couldn't connect DCOP signal.\nWon't receive any status notifications!" ) );
|
||||||
|
+ kdWarning() << "Couldn't connect DCOP signal. Won't receive any status notifications!" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
KIMProxy::~KIMProxy( )
|
@ -0,0 +1,81 @@
|
|||||||
|
Index: kded/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- kded/Makefile.am.orig
|
||||||
|
+++ kded/Makefile.am
|
||||||
|
@@ -36,12 +36,16 @@ kbuildsycoca_la_SOURCES = kbuildsycoca.c
|
||||||
|
kctimefactory.cpp \
|
||||||
|
vfolder_menu.cpp
|
||||||
|
|
||||||
|
-bin_PROGRAMS = kdontchangethehostname kde-menu
|
||||||
|
+bin_PROGRAMS = kdontchangethehostname kde-menu kmimelist
|
||||||
|
|
||||||
|
kdontchangethehostname_LDFLAGS = $(all_libraries) $(KDE_RPATH)
|
||||||
|
kdontchangethehostname_LDADD = $(LIB_KDECORE)
|
||||||
|
kdontchangethehostname_SOURCES = khostname.cpp
|
||||||
|
|
||||||
|
+kmimelist_LDFLAGS = $(all_libraries) $(KDE_RPATH)
|
||||||
|
+kmimelist_LDADD = ../kio/libkio.la
|
||||||
|
+kmimelist_SOURCES = kmimelist.cpp
|
||||||
|
+
|
||||||
|
kde_menu_LDFLAGS = $(all_libraries) $(KDE_RPATH)
|
||||||
|
kde_menu_LDADD = $(LIB_KIO)
|
||||||
|
kde_menu_SOURCES = kde-menu.cpp
|
||||||
|
Index: kded/kmimelist.cpp
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ kded/kmimelist.cpp
|
||||||
|
@@ -0,0 +1,54 @@
|
||||||
|
+#include <ktrader.h>
|
||||||
|
+#include <kservice.h>
|
||||||
|
+#include <kmimetype.h>
|
||||||
|
+#include <assert.h>
|
||||||
|
+#include <kstandarddirs.h>
|
||||||
|
+#include <kservicegroup.h>
|
||||||
|
+#include <kimageio.h>
|
||||||
|
+#include <kuserprofile.h>
|
||||||
|
+#include <kprotocolinfo.h>
|
||||||
|
+
|
||||||
|
+#include <kapplication.h>
|
||||||
|
+
|
||||||
|
+#include <stdio.h>
|
||||||
|
+
|
||||||
|
+int main(int argc, char *argv[])
|
||||||
|
+{
|
||||||
|
+ KApplication k(argc,argv,"blurb",false);
|
||||||
|
+
|
||||||
|
+ KMimeType::List mtl = KMimeType::allMimeTypes( );
|
||||||
|
+ assert( mtl.count() );
|
||||||
|
+ qDebug( "Found %d mime types.", mtl.count() );
|
||||||
|
+ QValueListIterator<KMimeType::Ptr> it(mtl.begin());
|
||||||
|
+ KServiceTypeProfile::OfferList ol;
|
||||||
|
+
|
||||||
|
+ for (; it != mtl.end(); ++it)
|
||||||
|
+ {
|
||||||
|
+ {
|
||||||
|
+ // Application
|
||||||
|
+ printf( "APP:%s:", (*it)->name().latin1() );
|
||||||
|
+ ol = KServiceTypeProfile::offers((*it)->name(), "Application");
|
||||||
|
+ QValueListIterator<KServiceOffer> it2(ol.begin());
|
||||||
|
+ for (; it2 != ol.end(); ++it2) {
|
||||||
|
+ if ((*it2).allowAsDefault())
|
||||||
|
+ printf( " %s", (*it2).service()->desktopEntryPath().ascii() );
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+ printf( "\n" );
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ {
|
||||||
|
+ // Embedded
|
||||||
|
+ printf( "PART:%s:", (*it)->name().latin1() );
|
||||||
|
+ ol = KServiceTypeProfile::offers((*it)->name(), "KParts/ReadOnlyPart");
|
||||||
|
+ QValueListIterator<KServiceOffer> it2(ol.begin());
|
||||||
|
+ for (; it2 != ol.end(); ++it2) {
|
||||||
|
+ if ((*it2).allowAsDefault())
|
||||||
|
+ printf( " %s", (*it2).service()->desktopEntryPath().ascii() );
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
+ printf( "\n" );
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
@ -0,0 +1,28 @@
|
|||||||
|
Index: kio/kio/kremoteencoding.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kremoteencoding.cpp.orig
|
||||||
|
+++ kio/kio/kremoteencoding.cpp
|
||||||
|
@@ -53,7 +53,7 @@ QCString KRemoteEncoding::encode(const Q
|
||||||
|
QCString result = codec->fromUnicode(name);
|
||||||
|
if (codec->toUnicode(result) != name)
|
||||||
|
return name.latin1();
|
||||||
|
-
|
||||||
|
+
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -80,11 +80,13 @@ void KRemoteEncoding::setEncoding(const
|
||||||
|
|
||||||
|
if (name)
|
||||||
|
codec = QTextCodec::codecForName(name);
|
||||||
|
+ else
|
||||||
|
+ codec = QTextCodec::codecForMib( 106 ); // fallback to UTF-8
|
||||||
|
|
||||||
|
if (codec == 0L)
|
||||||
|
codec = QTextCodec::codecForMib(1);
|
||||||
|
|
||||||
|
- kdDebug() << k_funcinfo << "setting encoding " << codec->name()
|
||||||
|
+ kdDebug() << k_funcinfo << "setting encoding " << codec->name()
|
||||||
|
<< " for name=" << name << endl;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
Index: kdeui/ktip.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/ktip.cpp.orig
|
||||||
|
+++ kdeui/ktip.cpp
|
||||||
|
@@ -367,24 +367,47 @@ void KTipDialog::showMultiTip(QWidget *p
|
||||||
|
mInstance->raise();
|
||||||
|
}
|
||||||
|
|
||||||
|
+static QString fixTip(QString tip)
|
||||||
|
+{
|
||||||
|
+ QRegExp iconRegExp("<img src=\"(.*)\">");
|
||||||
|
+ iconRegExp.setMinimal(true);
|
||||||
|
+ if (iconRegExp.search(tip)>-1) {
|
||||||
|
+ QString iconName = iconRegExp.cap(1);
|
||||||
|
+ if (!iconName.isEmpty())
|
||||||
|
+ if (KGlobal::dirs()->findResource("icon", iconName).isEmpty())
|
||||||
|
+ tip.replace("crystalsvg","hicolor");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return tip;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void KTipDialog::prevTip()
|
||||||
|
{
|
||||||
|
mDatabase->prevTip();
|
||||||
|
- mTipText->setText(QString::fromLatin1(
|
||||||
|
+ QString currentTip = QString::fromLatin1(
|
||||||
|
"<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
|
||||||
|
.arg(mTextColor.name())
|
||||||
|
.arg(mBaseColor.name())
|
||||||
|
- .arg(i18n(mDatabase->tip().utf8())));
|
||||||
|
+ .arg(i18n(mDatabase->tip().utf8()));
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ currentTip = fixTip(currentTip);
|
||||||
|
+ mTipText->setText(currentTip);
|
||||||
|
mTipText->setContentsPos(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KTipDialog::nextTip()
|
||||||
|
{
|
||||||
|
mDatabase->nextTip();
|
||||||
|
- mTipText->setText(QString::fromLatin1("<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
|
||||||
|
+ QString currentTip = QString::fromLatin1(
|
||||||
|
+ "<qt text=\"%1\" bgcolor=\"%2\">%3</qt>")
|
||||||
|
.arg(mTextColor.name())
|
||||||
|
.arg(mBaseColor.name())
|
||||||
|
- .arg(i18n(mDatabase->tip().utf8())));
|
||||||
|
+ .arg(i18n(mDatabase->tip().utf8()));
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ currentTip = fixTip(currentTip);
|
||||||
|
+ mTipText->setText(currentTip);
|
||||||
|
mTipText->setContentsPos(0, 0);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,81 @@
|
|||||||
|
Index: kio/misc/kwalletd/kwalletd.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/misc/kwalletd/kwalletd.cpp.orig
|
||||||
|
+++ kio/misc/kwalletd/kwalletd.cpp
|
||||||
|
@@ -355,6 +355,44 @@ int KWalletD::doTransactionOpen(const QC
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
+int KWalletD::tryOpen(const QString& wallet, const QCString& password)
|
||||||
|
+{
|
||||||
|
+ if (isOpen(wallet))
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ if (_tryOpenBlocked.isActive()) {
|
||||||
|
+ kdDebug() << "tryOpen is active.." << endl;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!KWallet::Backend::exists(wallet))
|
||||||
|
+ return -2;
|
||||||
|
+
|
||||||
|
+ KWallet::Backend *b = new KWallet::Backend(wallet, false /*isPath*/);
|
||||||
|
+ int rc = b->open(QByteArray().duplicate(password, strlen(password)));
|
||||||
|
+ if (rc == 0) {
|
||||||
|
+ _wallets.insert(rc = generateHandle(), b);
|
||||||
|
+ _passwords[wallet] = password;
|
||||||
|
+ b->ref();
|
||||||
|
+ _tryOpenBlocked.stop();
|
||||||
|
+ QByteArray data;
|
||||||
|
+ QDataStream ds(data, IO_WriteOnly);
|
||||||
|
+ ds << wallet;
|
||||||
|
+ emitDCOPSignal("walletOpened(QString)", data);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ delete b;
|
||||||
|
+ // make sure that we're not bombed with a dictionary attack
|
||||||
|
+ _tryOpenBlocked.start (30 * 1000, true /*single shot*/);
|
||||||
|
+ if (++_failed > 5) {
|
||||||
|
+ _failed = 0;
|
||||||
|
+ QTimer::singleShot(0, this, SLOT(notifyFailures()));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ rc = -1;
|
||||||
|
+ }
|
||||||
|
+ return rc;
|
||||||
|
+}
|
||||||
|
|
||||||
|
int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool isPath, WId w, bool modal) {
|
||||||
|
int rc = -1;
|
||||||
|
Index: kio/misc/kwalletd/kwalletd.h
|
||||||
|
===================================================================
|
||||||
|
--- kio/misc/kwalletd/kwalletd.h.orig
|
||||||
|
+++ kio/misc/kwalletd/kwalletd.h
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
#include <qintdict.h>
|
||||||
|
#include <qstring.h>
|
||||||
|
#include <qwidget.h>
|
||||||
|
+#include <qtimer.h>
|
||||||
|
#include <qguardedptr.h>
|
||||||
|
#include "kwalletbackend.h"
|
||||||
|
|
||||||
|
@@ -51,8 +52,10 @@ class KWalletD : public KDEDModule {
|
||||||
|
|
||||||
|
// Open and unlock the wallet
|
||||||
|
virtual int open(const QString& wallet, uint wId);
|
||||||
|
-
|
||||||
|
+ // Open and unlock the wallet
|
||||||
|
+ virtual int tryOpen(const QString& wallet, const QCString& passwd);
|
||||||
|
// Open and unlock the wallet with this path
|
||||||
|
+
|
||||||
|
virtual int openPath(const QString& path, uint wId);
|
||||||
|
|
||||||
|
// Asynchronous open - must give the object to return the handle
|
||||||
|
@@ -186,6 +189,7 @@ class KWalletD : public KDEDModule {
|
||||||
|
int _idleTime;
|
||||||
|
QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap;
|
||||||
|
KTimeout *_timeouts;
|
||||||
|
+ QTimer _tryOpenBlocked;
|
||||||
|
|
||||||
|
QPtrList<KWalletTransaction> _transactions;
|
||||||
|
QGuardedPtr< QWidget > activeDialog;
|
@ -0,0 +1,34 @@
|
|||||||
|
diff -ur kdelibs-3.5.10.orig/kstyles/light/lightstyle-v2.cpp kdelibs-3.5.10/kstyles/light/lightstyle-v2.cpp
|
||||||
|
--- kdelibs-3.5.10.orig/kstyles/light/lightstyle-v2.cpp 2006-03-17 13:19:10.000000000 +0300
|
||||||
|
+++ kdelibs-3.5.10/kstyles/light/lightstyle-v2.cpp 2011-05-07 23:30:18.000000000 +0400
|
||||||
|
@@ -501,12 +501,14 @@
|
||||||
|
p->drawLine(r.topLeft(), r.topRight());
|
||||||
|
p->setPen(cg.background());
|
||||||
|
p->drawLine(r.left(), r.top() + 1, r.right(), r.top() + 1);
|
||||||
|
- fr.addCoords(0, 2, 0, 0);
|
||||||
|
+ p->drawLine(r.left(), r.bottom(), r.right(), r.bottom());
|
||||||
|
+ fr.addCoords(0, 2, 0, -1);
|
||||||
|
} else {
|
||||||
|
p->drawLine(r.topLeft(), r.bottomLeft());
|
||||||
|
p->setPen(cg.background());
|
||||||
|
p->drawLine(r.left() + 1, r.top(), r.left() + 1, r.bottom());
|
||||||
|
- fr.addCoords(2, 0, 0, 0);
|
||||||
|
+ p->drawLine(r.right(), r.top(), r.right(), r.bottom());
|
||||||
|
+ fr.addCoords(2, 0, -1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
p->fillRect(fr, cg.brush((flags & Style_Down) ?
|
||||||
|
@@ -523,11 +525,13 @@
|
||||||
|
if (flags & Style_Horizontal) {
|
||||||
|
p->drawLine(r.topLeft(), r.topRight());
|
||||||
|
p->setPen(cg.background());
|
||||||
|
+ p->drawLine(r.left(), r.bottom(), r.right(), r.bottom());
|
||||||
|
p->drawLine(r.left(), r.top() + 1, r.right(), r.top() + 1);
|
||||||
|
fr.addCoords(0, 2, 0, -1);
|
||||||
|
} else {
|
||||||
|
p->drawLine(r.topLeft(), r.bottomLeft());
|
||||||
|
p->setPen(cg.background());
|
||||||
|
+ p->drawLine(r.right(), r.top(), r.right(), r.bottom());
|
||||||
|
p->drawLine(r.left() + 1, r.top(), r.left() + 1, r.bottom());
|
||||||
|
fr.addCoords(2, 0, -1, 0);
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
Index: kapplication.cpp
|
||||||
|
===================================================================
|
||||||
|
RCS file: /home/kde/kdelibs/kdecore/kapplication.cpp,v
|
||||||
|
retrieving revision 1.670
|
||||||
|
diff -u -p -r1.670 kapplication.cpp
|
||||||
|
--- kdecore/kapplication.cpp 22 Jul 2004 16:50:04 -0000 1.670
|
||||||
|
+++ kdecore/kapplication.cpp 16 Aug 2004 20:31:02 -0000
|
||||||
|
@@ -43,6 +43,7 @@
|
||||||
|
#include <qtooltip.h>
|
||||||
|
#include <qstylefactory.h>
|
||||||
|
#include <qmetaobject.h>
|
||||||
|
+#include <qimage.h>
|
||||||
|
#ifndef QT_NO_SQL
|
||||||
|
#include <qsqlpropertymap.h>
|
||||||
|
#endif
|
||||||
|
@@ -1975,6 +1976,12 @@ void KApplication::propagateSettings(Set
|
||||||
|
KConfigBase* config = KGlobal::config();
|
||||||
|
KConfigGroupSaver saver( config, "KDE" );
|
||||||
|
|
||||||
|
+#ifdef QT_HAVE_MAX_IMAGE_SIZE
|
||||||
|
+ QSize maxImageSize(4096, 4096);
|
||||||
|
+ maxImageSize = config->readSizeEntry("MaxImageSize", &maxImageSize);
|
||||||
|
+ QImage::setMaxImageSize(maxImageSize);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
int num = config->readNumEntry("CursorBlinkRate", QApplication::cursorFlashTime());
|
||||||
|
if ((num != 0) && (num < 200))
|
||||||
|
num = 200;
|
@ -0,0 +1,28 @@
|
|||||||
|
Index: kdeprint/kmvirtualmanager.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeprint/kmvirtualmanager.cpp.orig
|
||||||
|
+++ kdeprint/kmvirtualmanager.cpp
|
||||||
|
@@ -179,7 +179,7 @@ void KMVirtualManager::setAsDefault(KMPr
|
||||||
|
|
||||||
|
void KMVirtualManager::refresh()
|
||||||
|
{
|
||||||
|
- QFileInfo fi(QDir::homeDirPath() + QFile::decodeName("/.lpoptions"));
|
||||||
|
+ QFileInfo fi(QDir::homeDirPath() + QFile::decodeName("/.cups/lpoptions"));
|
||||||
|
QFileInfo fi2(QFile::decodeName("/etc/cups/lpoptions"));
|
||||||
|
|
||||||
|
// if root, then only use global file: trick -> use twice the same file
|
||||||
|
@@ -301,7 +301,13 @@ void KMVirtualManager::triggerSave()
|
||||||
|
filename = QFile::decodeName("/etc/cups/lpoptions");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- filename = QDir::homeDirPath() + QFile::decodeName("/.lpoptions");
|
||||||
|
+ {
|
||||||
|
+ QDir cupsDir(QDir::home().absPath()+"/.cups");
|
||||||
|
+ if (!cupsDir.exists())
|
||||||
|
+ cupsDir.mkdir(QDir::home().absPath()+"/.cups");
|
||||||
|
+ filename = QDir::homeDirPath() + QFile::decodeName("/.cups/lpoptions");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (!filename.isEmpty())
|
||||||
|
{
|
||||||
|
saveFile(filename);
|
@ -0,0 +1,36 @@
|
|||||||
|
Index: mimetypes/application/x-rpm.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/application/x-rpm.desktop.orig
|
||||||
|
+++ mimetypes/application/x-rpm.desktop
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
+X-KDE-AutoEmbed=true
|
||||||
|
Type=MimeType
|
||||||
|
MimeType=application/x-rpm
|
||||||
|
Icon=rpm
|
||||||
|
Index: mimetypes/application/x-ogg.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/application/x-ogg.desktop.orig
|
||||||
|
+++ mimetypes/application/x-ogg.desktop
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
# application/ogg "inherits" from it, so that apps associated with x-ogg can open ogg files.
|
||||||
|
Type=MimeType
|
||||||
|
MimeType=application/x-ogg
|
||||||
|
-Icon=multimedia
|
||||||
|
+Icon=sound
|
||||||
|
Comment=Ogg Multimedia
|
||||||
|
Comment[ar]=وسائط Ogg متعددة
|
||||||
|
Comment[az]=Ogg Multimediya
|
||||||
|
Index: mimetypes/application/ogg.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/application/ogg.desktop.orig
|
||||||
|
+++ mimetypes/application/ogg.desktop
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=MimeType
|
||||||
|
MimeType=application/ogg
|
||||||
|
-Icon=multimedia
|
||||||
|
+Icon=sound
|
||||||
|
Patterns=*.ogg;*.OGG;
|
||||||
|
# Previous name of this mimetype
|
||||||
|
X-KDE-IsAlso=application/x-ogg
|
Binary file not shown.
@ -0,0 +1,19 @@
|
|||||||
|
Index: kdefx/kstyle.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdefx/kstyle.cpp.orig
|
||||||
|
+++ kdefx/kstyle.cpp
|
||||||
|
@@ -2210,6 +2210,14 @@ void TransparencyHandler::XRenderBlendTo
|
||||||
|
void KStyle::virtual_hook( int, void* )
|
||||||
|
{ /*BASE::virtual_hook( id, data );*/ }
|
||||||
|
|
||||||
|
+// HACK for gtk-qt-engine
|
||||||
|
+
|
||||||
|
+KDE_EXPORT extern "C"
|
||||||
|
+void kde_kstyle_set_scrollbar_type_windows( void* style )
|
||||||
|
+{
|
||||||
|
+ ((KStyle*)style)->setScrollBarType( KStyle::WindowsStyleScrollBar );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
// vim: set noet ts=4 sw=4:
|
||||||
|
// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,158 @@
|
|||||||
|
Index: kdecore/kdebug.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kdebug.cpp.orig
|
||||||
|
+++ kdecore/kdebug.cpp
|
||||||
|
@@ -170,7 +170,7 @@ static KStaticDeleter<kDebugPrivate> pcd
|
||||||
|
static KStaticDeleter<KDebugDCOPIface> dcopsd;
|
||||||
|
static KDebugDCOPIface* kDebugDCOPIface = 0;
|
||||||
|
|
||||||
|
-static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char *data)
|
||||||
|
+static void kDebugInitBackend(unsigned int nArea)
|
||||||
|
{
|
||||||
|
if ( !kDebug_data )
|
||||||
|
{
|
||||||
|
@@ -205,40 +205,46 @@ static void kDebugBackend( unsigned shor
|
||||||
|
if ( KGlobal::_instance )
|
||||||
|
kDebug_data->aAreaName = KGlobal::instance()->instanceName();
|
||||||
|
}
|
||||||
|
+}
|
||||||
|
|
||||||
|
- int nPriority = 0;
|
||||||
|
- QString aCaption;
|
||||||
|
-
|
||||||
|
- /* Determine output */
|
||||||
|
+static short kDebugAreaOutput(unsigned short nLevel, unsigned int nArea)
|
||||||
|
+{
|
||||||
|
+ kDebugInitBackend (nArea);
|
||||||
|
|
||||||
|
+ /* Determine output */
|
||||||
|
QString key;
|
||||||
|
switch( nLevel )
|
||||||
|
{
|
||||||
|
case KDEBUG_INFO:
|
||||||
|
key = "InfoOutput";
|
||||||
|
- aCaption = "Info";
|
||||||
|
- nPriority = LOG_INFO;
|
||||||
|
break;
|
||||||
|
case KDEBUG_WARN:
|
||||||
|
key = "WarnOutput";
|
||||||
|
- aCaption = "Warning";
|
||||||
|
- nPriority = LOG_WARNING;
|
||||||
|
break;
|
||||||
|
case KDEBUG_FATAL:
|
||||||
|
key = "FatalOutput";
|
||||||
|
- aCaption = "Fatal Error";
|
||||||
|
- nPriority = LOG_CRIT;
|
||||||
|
break;
|
||||||
|
case KDEBUG_ERROR:
|
||||||
|
default:
|
||||||
|
/* Programmer error, use "Error" as default */
|
||||||
|
key = "ErrorOutput";
|
||||||
|
- aCaption = "Error";
|
||||||
|
- nPriority = LOG_ERR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
- short nOutput = kDebug_data->config ? kDebug_data->config->readNumEntry(key, 2) : 2;
|
||||||
|
+ return kDebug_data->config ? kDebug_data->config->readNumEntry(key, 4) : 4;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+bool kDebugAreaEnabled(unsigned short nLevel, unsigned int nArea)
|
||||||
|
+{
|
||||||
|
+ return kDebugAreaOutput(nLevel, nArea) != 4;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char *data)
|
||||||
|
+{
|
||||||
|
+ kDebugInitBackend (nArea);
|
||||||
|
+
|
||||||
|
+ short nOutput = kDebugAreaOutput(nLevel, nArea);
|
||||||
|
|
||||||
|
// If the application doesn't have a QApplication object it can't use
|
||||||
|
// a messagebox.
|
||||||
|
@@ -247,6 +253,32 @@ static void kDebugBackend( unsigned shor
|
||||||
|
else if ( nOutput == 4 && nLevel != KDEBUG_FATAL )
|
||||||
|
return;
|
||||||
|
|
||||||
|
+ int nPriority = 0;
|
||||||
|
+ QString aCaption;
|
||||||
|
+ switch( nLevel )
|
||||||
|
+ {
|
||||||
|
+ case KDEBUG_INFO:
|
||||||
|
+ aCaption = "Info";
|
||||||
|
+ nPriority = LOG_INFO;
|
||||||
|
+ break;
|
||||||
|
+ case KDEBUG_WARN:
|
||||||
|
+ aCaption = "Warning";
|
||||||
|
+ nPriority = LOG_WARNING;
|
||||||
|
+ break;
|
||||||
|
+ case KDEBUG_FATAL:
|
||||||
|
+ aCaption = "Fatal Error";
|
||||||
|
+ nPriority = LOG_CRIT;
|
||||||
|
+ break;
|
||||||
|
+ case KDEBUG_ERROR:
|
||||||
|
+ default:
|
||||||
|
+ /* Programmer error, use "Error" as default */
|
||||||
|
+ aCaption = "Error";
|
||||||
|
+ nPriority = LOG_ERR;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
const int BUFSIZE = 4096;
|
||||||
|
char buf[BUFSIZE];
|
||||||
|
if ( !kDebug_data->aAreaName.isEmpty() ) {
|
||||||
|
@@ -314,13 +346,25 @@ static void kDebugBackend( unsigned shor
|
||||||
|
}
|
||||||
|
|
||||||
|
kdbgstream &perror( kdbgstream &s) { return s << QString::fromLocal8Bit(strerror(errno)); }
|
||||||
|
-kdbgstream kdDebug(int area) { return kdbgstream(area, KDEBUG_INFO); }
|
||||||
|
-kdbgstream kdDebug(bool cond, int area) { if (cond) return kdbgstream(area, KDEBUG_INFO); else return kdbgstream(0, 0, false); }
|
||||||
|
+kdbgstream kdDebug(int area) { return kdbgstream(area, KDEBUG_INFO, kDebugAreaEnabled(KDEBUG_INFO, area)); }
|
||||||
|
+kdbgstream kdDebug(bool cond, int area) { if (cond) return kdbgstream(area, KDEBUG_INFO, kDebugAreaEnabled(KDEBUG_INFO, area)); else return kdbgstream(0, 0, false); }
|
||||||
|
|
||||||
|
kdbgstream kdError(int area) { return kdbgstream("ERROR: ", area, KDEBUG_ERROR); }
|
||||||
|
kdbgstream kdError(bool cond, int area) { if (cond) return kdbgstream("ERROR: ", area, KDEBUG_ERROR); else return kdbgstream(0,0,false); }
|
||||||
|
-kdbgstream kdWarning(int area) { return kdbgstream("WARNING: ", area, KDEBUG_WARN); }
|
||||||
|
-kdbgstream kdWarning(bool cond, int area) { if (cond) return kdbgstream("WARNING: ", area, KDEBUG_WARN); else return kdbgstream(0,0,false); }
|
||||||
|
+
|
||||||
|
+kdbgstream kdWarning(int area)
|
||||||
|
+{
|
||||||
|
+ return kdbgstream("WARNING: ", area, KDEBUG_WARN, kDebugAreaEnabled(KDEBUG_WARN, area));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+kdbgstream kdWarning(bool cond, int area)
|
||||||
|
+{
|
||||||
|
+ if (cond)
|
||||||
|
+ return kdbgstream("WARNING: ", area, KDEBUG_WARN, kDebugAreaEnabled(KDEBUG_WARN, area));
|
||||||
|
+ else
|
||||||
|
+ return kdbgstream(0,0,false);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
kdbgstream kdFatal(int area) { return kdbgstream("FATAL: ", area, KDEBUG_FATAL); }
|
||||||
|
kdbgstream kdFatal(bool cond, int area) { if (cond) return kdbgstream("FATAL: ", area, KDEBUG_FATAL); else return kdbgstream(0,0,false); }
|
||||||
|
|
||||||
|
@@ -331,9 +375,10 @@ kdbgstream::kdbgstream(kdbgstream &str)
|
||||||
|
}
|
||||||
|
|
||||||
|
void kdbgstream::flush() {
|
||||||
|
- if (output.isEmpty() || !print)
|
||||||
|
+ if (output.isEmpty())
|
||||||
|
return;
|
||||||
|
- kDebugBackend( level, area, output.local8Bit().data() );
|
||||||
|
+ if (print)
|
||||||
|
+ kDebugBackend( level, area, output.local8Bit().data() );
|
||||||
|
output = QString::null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -349,7 +394,7 @@ kdbgstream &kdbgstream::form(const char
|
||||||
|
}
|
||||||
|
|
||||||
|
kdbgstream::~kdbgstream() {
|
||||||
|
- if (!output.isEmpty()) {
|
||||||
|
+ if (print && !output.isEmpty()) {
|
||||||
|
fprintf(stderr, "ASSERT: debug output not ended with \\n\n");
|
||||||
|
fprintf(stderr, "%s", kdBacktrace().latin1());
|
||||||
|
*this << "\n";
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: kio/kio/netaccess.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/netaccess.cpp.orig
|
||||||
|
+++ kio/kio/netaccess.cpp
|
||||||
|
@@ -337,7 +337,7 @@ bool NetAccess::statInternal( const KURL
|
||||||
|
QWidget* window )
|
||||||
|
{
|
||||||
|
bJobOK = true; // success unless further error occurs
|
||||||
|
- KIO::StatJob * job = KIO::stat( url, !url.isLocalFile() );
|
||||||
|
+ KIO::StatJob * job = KIO::stat( url, !url.isLocalFile() && !url.url().startsWith("beagle:?") );
|
||||||
|
job->setWindow (window);
|
||||||
|
job->setDetails( details );
|
||||||
|
job->setSide( source );
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: configure.in.in
|
||||||
|
===================================================================
|
||||||
|
--- configure.in.in.orig
|
||||||
|
+++ configure.in.in
|
||||||
|
@@ -17,7 +17,7 @@ AC_CANONICAL_SYSTEM
|
||||||
|
AC_ARG_PROGRAM
|
||||||
|
|
||||||
|
dnl Automake doc recommends to do this only here. (Janos)
|
||||||
|
-AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
|
||||||
|
+AM_INIT_AUTOMAKE("kdelibs", @VERSION@) dnl searches for some needed programs
|
||||||
|
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
Index: kdelibs-3.5.10/kinit/start_kdeinit.c
|
||||||
|
===================================================================
|
||||||
|
--- kdelibs-3.5.10.orig/kinit/start_kdeinit.c
|
||||||
|
+++ kdelibs-3.5.10/kinit/start_kdeinit.c
|
||||||
|
@@ -44,11 +44,30 @@ static int set_protection( pid_t pid, in
|
||||||
|
{
|
||||||
|
char buf[ 1024 ];
|
||||||
|
int procfile;
|
||||||
|
+ struct stat st;
|
||||||
|
+
|
||||||
|
+ /* Newer kernels (noticed in 2.6.36) */
|
||||||
|
+ sprintf( buf, "/proc/%d/oom_score_adj", pid );
|
||||||
|
+ if ( lstat (buf, &st) == 0) {
|
||||||
|
+ if( !enable ) {
|
||||||
|
+ /* Be paranoid and check that the pid we got from the pipe
|
||||||
|
+ belongs to this user. */
|
||||||
|
+ if( st.st_uid != getuid())
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ procfile = open(buf, O_WRONLY);
|
||||||
|
+ if( enable )
|
||||||
|
+ write( procfile, "-300", sizeof( "-300" ));
|
||||||
|
+ else
|
||||||
|
+ write( procfile, "0", sizeof( "0" ));
|
||||||
|
+ close( procfile );
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
sprintf( buf, "/proc/%d/stat", pid );
|
||||||
|
if( !enable ) {
|
||||||
|
/* Be paranoid and check that the pid we got from the pipe
|
||||||
|
belongs to this user. */
|
||||||
|
- struct stat st;
|
||||||
|
if( lstat( buf, &st ) < 0 || st.st_uid != getuid())
|
||||||
|
return 0;
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
Index: mimetypes/application/vnd.oasis.opendocument.formula.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/application/vnd.oasis.opendocument.formula.desktop.orig
|
||||||
|
+++ mimetypes/application/vnd.oasis.opendocument.formula.desktop
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
Type=MimeType
|
||||||
|
MimeType=application/vnd.oasis.opendocument.formula
|
||||||
|
Patterns=*.odf;*.ODF
|
||||||
|
-Icon=formula
|
||||||
|
+Icon=kformula_kfo
|
||||||
|
Comment=OASIS OpenDocument Formula
|
||||||
|
Comment[af]=OASIS Oop Dokument formule
|
||||||
|
Comment[be]=Формула OASIS OpenDocument
|
||||||
|
Index: mimetypes/application/vnd.sun.xml.base.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/application/vnd.sun.xml.base.desktop.orig
|
||||||
|
+++ mimetypes/application/vnd.sun.xml.base.desktop
|
||||||
|
@@ -67,7 +67,7 @@ Comment[vi]=Cơ sở dữ liệu OpenOff
|
||||||
|
Comment[zh_CN]=OpenOffice.org 数据库
|
||||||
|
Comment[zh_HK]=OpenOffice.org 資料庫
|
||||||
|
Comment[zh_TW]=OpenOffice.org 資料庫
|
||||||
|
-Icon=spreadsheet
|
||||||
|
+Icon=database
|
||||||
|
Type=MimeType
|
||||||
|
Patterns=*.odb;*.ODB;
|
||||||
|
MimeType=application/vnd.sun.xml.base
|
||||||
|
Index: mimetypes/text/rtf.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/text/rtf.desktop.orig
|
||||||
|
+++ mimetypes/text/rtf.desktop
|
||||||
|
@@ -77,7 +77,7 @@ Comment[wa]=Documint RTF
|
||||||
|
Comment[zh_CN]=RTF 文档
|
||||||
|
Comment[zh_HK]=RTF 文件
|
||||||
|
Comment[zh_TW]=RTF 文件
|
||||||
|
-Icon=wordprocessing
|
||||||
|
+Icon=rtf
|
||||||
|
Type=MimeType
|
||||||
|
Patterns=*.rtf;*.RTF;
|
||||||
|
[Property::X-KDE-text]
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: kdecore/kstandarddirs.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kstandarddirs.cpp.orig
|
||||||
|
+++ kdecore/kstandarddirs.cpp
|
||||||
|
@@ -1290,6 +1290,8 @@ void KStandardDirs::addKDEDefaults()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ kdedirList.append("/etc/opt/kde3");
|
||||||
|
+
|
||||||
|
#ifndef Q_OS_WIN //no default KDEDIR on win32 defined
|
||||||
|
kdedirList.append(KDEDIR);
|
||||||
|
#endif
|
@ -0,0 +1,14 @@
|
|||||||
|
Index: kdeprint/kprintpreview.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeprint/kprintpreview.cpp.orig
|
||||||
|
+++ kdeprint/kprintpreview.cpp
|
||||||
|
@@ -108,6 +108,9 @@ static KLibFactory* componentFactory()
|
||||||
|
{
|
||||||
|
kdDebug(500) << "kdeprint: querying trader for 'application/postscript' service" << endl;
|
||||||
|
KLibFactory *factory(0);
|
||||||
|
+ factory = KLibLoader::self()->factory("libkghostviewpart");
|
||||||
|
+ if( factory )
|
||||||
|
+ return factory;
|
||||||
|
KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("application/postscript"), QString::fromLatin1("KParts/ReadOnlyPart"), QString::null, QString::null);
|
||||||
|
for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
|
||||||
|
{
|
@ -0,0 +1,24 @@
|
|||||||
|
Index: khtml/rendering/table_layout.cpp
|
||||||
|
===================================================================
|
||||||
|
--- khtml/rendering/table_layout.cpp.orig
|
||||||
|
+++ khtml/rendering/table_layout.cpp
|
||||||
|
@@ -297,7 +297,8 @@ void FixedTableLayout::layout()
|
||||||
|
#endif
|
||||||
|
for ( int i = 0; available > 0 && i < nEffCols; i++ ) {
|
||||||
|
if ( width[i].isPercent() ) {
|
||||||
|
- int w = base * width[i].value() / totalPercent;
|
||||||
|
+ // totalPercent may be 0 below if all %-width specifed are 0%. (#172557)
|
||||||
|
+ int w = totalPercent ? base * width[i].value() / totalPercent : 0;
|
||||||
|
available -= w;
|
||||||
|
calcWidth[i] = w;
|
||||||
|
}
|
||||||
|
@@ -313,7 +314,8 @@ void FixedTableLayout::layout()
|
||||||
|
|
||||||
|
for ( int i = 0; available > 0 && i < nEffCols; i++ ) {
|
||||||
|
if ( width[i].isVariable() ) {
|
||||||
|
- int w = available / totalVariable;
|
||||||
|
+ // totalVariable may be 0 below if all the variable widths specified are 0.
|
||||||
|
+ int w = totalVariable ? available / totalVariable : 0;
|
||||||
|
available -= w;
|
||||||
|
calcWidth[i] = w;
|
||||||
|
totalVariable--;
|
@ -0,0 +1,380 @@
|
|||||||
|
Index: kdefx/kstyle.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdefx/kstyle.cpp.orig
|
||||||
|
+++ kdefx/kstyle.cpp
|
||||||
|
@@ -154,6 +154,7 @@ struct KStylePrivate
|
||||||
|
bool menuAltKeyNavigation : 1;
|
||||||
|
bool menuDropShadow : 1;
|
||||||
|
bool sloppySubMenus : 1;
|
||||||
|
+ bool semiTransparentRubberband : 1;
|
||||||
|
int popupMenuDelay;
|
||||||
|
float menuOpacity;
|
||||||
|
|
||||||
|
@@ -187,6 +188,7 @@ KStyle::KStyle( KStyleFlags flags, KStyl
|
||||||
|
d->menuAltKeyNavigation = settings.readBoolEntry("/KStyle/Settings/MenuAltKeyNavigation", true);
|
||||||
|
d->scrollablePopupmenus = settings.readBoolEntry("/KStyle/Settings/ScrollablePopupMenus", false);
|
||||||
|
d->menuDropShadow = settings.readBoolEntry("/KStyle/Settings/MenuDropShadow", false);
|
||||||
|
+ d->semiTransparentRubberband = settings.readBoolEntry("/KStyle/Settings/SemiTransparentRubberband", false);
|
||||||
|
d->menuHandler = NULL;
|
||||||
|
|
||||||
|
if (useMenuTransparency) {
|
||||||
|
@@ -553,7 +555,57 @@ void KStyle::drawPrimitive( PrimitiveEle
|
||||||
|
else
|
||||||
|
// General handle, probably a kicker applet handle.
|
||||||
|
drawKStylePrimitive( KPE_GeneralHandle, p, widget, r, cg, flags, opt );
|
||||||
|
-
|
||||||
|
+#if QT_VERSION >= 0x030300
|
||||||
|
+#ifdef HAVE_XRENDER
|
||||||
|
+ } else if ( d->semiTransparentRubberband && pe == QStyle::PE_RubberBand ) {
|
||||||
|
+ QRect rect = r.normalize();
|
||||||
|
+ QPoint point;
|
||||||
|
+ point = p->xForm( point );
|
||||||
|
+
|
||||||
|
+ static XRenderColor clr = { 0, 0, 0, 0 };
|
||||||
|
+ static unsigned long fillColor = 0;
|
||||||
|
+ if ( fillColor != cg.highlight().rgb() ) {
|
||||||
|
+ fillColor = cg.highlight().rgb();
|
||||||
|
+
|
||||||
|
+ unsigned long color = fillColor << 8 | 0x40;
|
||||||
|
+
|
||||||
|
+ int red = (color >> 24) & 0xff;
|
||||||
|
+ int green = (color >> 16) & 0xff;
|
||||||
|
+ int blue = (color >> 8) & 0xff;
|
||||||
|
+ int alpha = (color >> 0) & 0xff;
|
||||||
|
+
|
||||||
|
+ red = red * alpha / 255;
|
||||||
|
+ green = green * alpha / 255;
|
||||||
|
+ blue = blue * alpha / 255;
|
||||||
|
+
|
||||||
|
+ clr.red = (red << 8) + red;
|
||||||
|
+ clr.green = (green << 8) + green;
|
||||||
|
+ clr.blue = (blue << 8) + blue;
|
||||||
|
+ clr.alpha = (alpha << 8) + alpha;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ XRenderFillRectangle(
|
||||||
|
+ p->device()->x11Display(),
|
||||||
|
+ PictOpOver,
|
||||||
|
+ p->device()->x11RenderHandle(),
|
||||||
|
+ &clr,
|
||||||
|
+ rect.x() + point.x(),
|
||||||
|
+ rect.y() + point.y(),
|
||||||
|
+ rect.width(),
|
||||||
|
+ rect.height() );
|
||||||
|
+
|
||||||
|
+ p->save();
|
||||||
|
+ p->setRasterOp( Qt::CopyROP );
|
||||||
|
+ p->setPen( QPen( cg.highlight().dark( 160 ), 1 ) );
|
||||||
|
+ p->setBrush( NoBrush );
|
||||||
|
+ p->drawRect(
|
||||||
|
+ rect.x() + point.x(),
|
||||||
|
+ rect.y() + point.y(),
|
||||||
|
+ rect.width(),
|
||||||
|
+ rect.height() );
|
||||||
|
+ p->restore();
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
} else
|
||||||
|
QCommonStyle::drawPrimitive( pe, p, r, cg, flags, opt );
|
||||||
|
}
|
||||||
|
Index: kdeui/kiconview.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kiconview.cpp.orig
|
||||||
|
+++ kdeui/kiconview.cpp
|
||||||
|
@@ -548,7 +548,7 @@ void KIconViewItem::calcRect( const QStr
|
||||||
|
r = m_wordWrap->boundingRect();
|
||||||
|
|
||||||
|
int realWidth = QMAX( QMIN( r.width() + 4, tw ), fm->width( "X" ) );
|
||||||
|
- itemTextRect.setWidth( realWidth );
|
||||||
|
+ itemTextRect.setWidth( realWidth + 4 );
|
||||||
|
itemTextRect.setHeight( r.height() );
|
||||||
|
|
||||||
|
int w = 0; int h = 0; int y = 0;
|
||||||
|
@@ -699,11 +699,13 @@ void KIconViewItem::paintPixmap( QPainte
|
||||||
|
|
||||||
|
void KIconViewItem::paintText( QPainter *p, const QColorGroup &cg )
|
||||||
|
{
|
||||||
|
- int textX = textRect( false ).x() + 2;
|
||||||
|
+ int textX = textRect( false ).x() + 4;
|
||||||
|
int textY = textRect( false ).y();
|
||||||
|
|
||||||
|
if ( isSelected() ) {
|
||||||
|
- p->fillRect( textRect( false ), cg.highlight() );
|
||||||
|
+ p->setBrush(QBrush(cg.highlight()));
|
||||||
|
+ p->setPen(QPen(cg.highlight()));
|
||||||
|
+ p->drawRoundRect( textRect( false ) ,1000/textRect(false).width(),1000/textRect(false).height() );
|
||||||
|
p->setPen( QPen( cg.highlightedText() ) );
|
||||||
|
} else {
|
||||||
|
if ( iconView()->itemTextBackground() != NoBrush )
|
||||||
|
Index: kdeui/kjanuswidget.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kjanuswidget.cpp.orig
|
||||||
|
+++ kdeui/kjanuswidget.cpp
|
||||||
|
@@ -49,16 +49,19 @@ class KJanusWidget::IconListItem : publi
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IconListItem( QListBox *listbox, const QPixmap &pixmap,
|
||||||
|
- const QString &text );
|
||||||
|
+ const QString &text );
|
||||||
|
virtual int height( const QListBox *lb ) const;
|
||||||
|
virtual int width( const QListBox *lb ) const;
|
||||||
|
int expandMinimumWidth( int width );
|
||||||
|
+ void highlight( bool erase );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
const QPixmap &defaultPixmap();
|
||||||
|
void paint( QPainter *painter );
|
||||||
|
-
|
||||||
|
+
|
||||||
|
private:
|
||||||
|
+ void paintContents( QPainter *painter );
|
||||||
|
+
|
||||||
|
QPixmap mPixmap;
|
||||||
|
int mMinimumWidth;
|
||||||
|
};
|
||||||
|
@@ -141,6 +144,8 @@ KJanusWidget::KJanusWidget( QWidget *par
|
||||||
|
|
||||||
|
mIconList->verticalScrollBar()->installEventFilter( this );
|
||||||
|
connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage()));
|
||||||
|
+ connect( mIconList, SIGNAL(onItem(QListBoxItem *)), SLOT(slotOnItem(QListBoxItem *)));
|
||||||
|
+
|
||||||
|
hbox->addSpacing( KDialog::marginHint() );
|
||||||
|
page = new QFrame( this );
|
||||||
|
hbox->addWidget( page, 10 );
|
||||||
|
@@ -259,7 +264,7 @@ void KJanusWidget::slotReopen( QListView
|
||||||
|
}
|
||||||
|
|
||||||
|
QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
|
||||||
|
- const QPixmap &pixmap )
|
||||||
|
+ const QPixmap &pixmap )
|
||||||
|
{
|
||||||
|
QStringList items;
|
||||||
|
items << itemName;
|
||||||
|
@@ -269,8 +274,8 @@ QFrame *KJanusWidget::addPage( const QSt
|
||||||
|
|
||||||
|
|
||||||
|
QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
|
||||||
|
- const QString &header,
|
||||||
|
- const QPixmap &pixmap )
|
||||||
|
+ const QString &header,
|
||||||
|
+ const QPixmap &pixmap )
|
||||||
|
{
|
||||||
|
if( !mValid )
|
||||||
|
{
|
||||||
|
@@ -721,6 +726,12 @@ void KJanusWidget::slotItemClicked(QList
|
||||||
|
it->setOpen(!it->isOpen());
|
||||||
|
}
|
||||||
|
|
||||||
|
+// hack because qt does not support Q_OBJECT in nested classes
|
||||||
|
+void KJanusWidget::slotOnItem(QListBoxItem *qitem)
|
||||||
|
+{
|
||||||
|
+ mIconList->slotOnItem( qitem );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void KJanusWidget::setFocus()
|
||||||
|
{
|
||||||
|
if( !mValid ) { return; }
|
||||||
|
@@ -929,11 +940,11 @@ bool KJanusWidget::eventFilter( QObject
|
||||||
|
KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name,
|
||||||
|
WFlags f )
|
||||||
|
:KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
|
||||||
|
- mWidthValid(false)
|
||||||
|
+ mWidthValid(false),
|
||||||
|
+ mOldItem(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
void KJanusWidget::IconListBox::updateMinimumHeight()
|
||||||
|
{
|
||||||
|
if( mShowAll && !mHeightValid )
|
||||||
|
@@ -995,6 +1006,45 @@ void KJanusWidget::IconListBox::setShowA
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+void KJanusWidget::IconListBox::leaveEvent( QEvent *ev )
|
||||||
|
+{
|
||||||
|
+ KListBox::leaveEvent( ev );
|
||||||
|
+
|
||||||
|
+ if ( mOldItem && !mOldItem->isSelected() )
|
||||||
|
+ {
|
||||||
|
+ ((KJanusWidget::IconListItem *) mOldItem)->highlight( true );
|
||||||
|
+ mOldItem = 0;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+// hack because qt does not support Q_OBJECT in nested classes
|
||||||
|
+void KJanusWidget::IconListBox::slotOnItem(QListBoxItem *qitem)
|
||||||
|
+{
|
||||||
|
+ KListBox::slotOnItem( qitem );
|
||||||
|
+
|
||||||
|
+ if ( qitem == mOldItem )
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if ( mOldItem && !mOldItem->isSelected() )
|
||||||
|
+ {
|
||||||
|
+ ((KJanusWidget::IconListItem *) mOldItem)->highlight( true );
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ KJanusWidget::IconListItem *item = dynamic_cast< KJanusWidget::IconListItem * >( qitem );
|
||||||
|
+ if ( item && !item->isSelected() )
|
||||||
|
+ {
|
||||||
|
+ item->highlight( false );
|
||||||
|
+ mOldItem = item;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ mOldItem = 0;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
|
||||||
|
KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap,
|
||||||
|
const QString &text )
|
||||||
|
@@ -1006,6 +1056,7 @@ KJanusWidget::IconListItem::IconListItem
|
||||||
|
mPixmap = defaultPixmap();
|
||||||
|
}
|
||||||
|
setText( text );
|
||||||
|
+ setCustomHighlighting( true );
|
||||||
|
mMinimumWidth = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1017,6 +1068,36 @@ int KJanusWidget::IconListItem::expandMi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+void KJanusWidget::IconListItem::highlight( bool erase )
|
||||||
|
+{
|
||||||
|
+ QRect r = listBox()->itemRect( this );
|
||||||
|
+ r.addCoords( 1, 1, -1, -1 );
|
||||||
|
+
|
||||||
|
+ QPainter p( listBox()->viewport() );
|
||||||
|
+ p.setClipRegion( r );
|
||||||
|
+
|
||||||
|
+ const QColorGroup &cg = listBox()->colorGroup();
|
||||||
|
+ if ( erase )
|
||||||
|
+ {
|
||||||
|
+ p.setPen( cg.base() );
|
||||||
|
+ p.setBrush( cg.base() );
|
||||||
|
+ p.drawRect( r );
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ p.setBrush( cg.highlight().light( 120 ) );
|
||||||
|
+ p.drawRect( r );
|
||||||
|
+
|
||||||
|
+ p.setPen( cg.highlight().dark( 140 ) );
|
||||||
|
+ p.drawRect( r );
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ p.setPen( cg.foreground() );
|
||||||
|
+ p.translate( r.x() - 1, r.y() - 1 );
|
||||||
|
+ paintContents( &p );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
const QPixmap &KJanusWidget::IconListItem::defaultPixmap()
|
||||||
|
{
|
||||||
|
static QPixmap *pix=0;
|
||||||
|
@@ -1044,15 +1125,34 @@ const QPixmap &KJanusWidget::IconListIte
|
||||||
|
|
||||||
|
void KJanusWidget::IconListItem::paint( QPainter *painter )
|
||||||
|
{
|
||||||
|
+ QRect itemPaintRegion( listBox()->itemRect( this ) );
|
||||||
|
+ QRect r( 1, 1, itemPaintRegion.width() - 2, itemPaintRegion.height() - 2);
|
||||||
|
+
|
||||||
|
+ if ( isSelected() )
|
||||||
|
+ {
|
||||||
|
+ painter->eraseRect( r );
|
||||||
|
+
|
||||||
|
+ painter->save();
|
||||||
|
+ painter->setPen( listBox()->colorGroup().highlight().dark( 160 ) );
|
||||||
|
+ painter->drawRect( r );
|
||||||
|
+ painter->restore();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ paintContents( painter );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+void KJanusWidget::IconListItem::paintContents( QPainter *painter )
|
||||||
|
+{
|
||||||
|
QFontMetrics fm = painter->fontMetrics();
|
||||||
|
int ht = fm.boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).height();
|
||||||
|
int wp = mPixmap.width();
|
||||||
|
int hp = mPixmap.height();
|
||||||
|
+ painter->drawPixmap( (mMinimumWidth - wp) / 2, 5, mPixmap );
|
||||||
|
|
||||||
|
- painter->drawPixmap( (mMinimumWidth-wp)/2, 5, mPixmap );
|
||||||
|
if( !text().isEmpty() )
|
||||||
|
{
|
||||||
|
- painter->drawText( 0, hp+7, mMinimumWidth, ht, Qt::AlignCenter, text() );
|
||||||
|
+ painter->drawText( 1, hp + 7, mMinimumWidth - 2, ht, Qt::AlignCenter, text() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1082,6 +1182,7 @@ int KJanusWidget::IconListItem::width( c
|
||||||
|
void KJanusWidget::virtual_hook( int, void* )
|
||||||
|
{ /*BASE::virtual_hook( id, data );*/ }
|
||||||
|
|
||||||
|
+
|
||||||
|
// TODO: In TreeList, if the last child of a node is removed, and there is no corrsponding widget for that node, allow the caller to
|
||||||
|
// delete the node.
|
||||||
|
void KJanusWidget::removePage( QWidget *page )
|
||||||
|
@@ -1129,6 +1230,7 @@ void KJanusWidget::removePage( QWidget *
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
QString KJanusWidget::pageTitle(int index) const
|
||||||
|
{
|
||||||
|
if (!d || !d->mIntToTitle.contains(index))
|
||||||
|
@@ -1137,6 +1239,7 @@ QString KJanusWidget::pageTitle(int inde
|
||||||
|
return d->mIntToTitle[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
QWidget *KJanusWidget::pageWidget(int index) const
|
||||||
|
{
|
||||||
|
if (!d || !d->mIntToPage.contains(index))
|
||||||
|
Index: kdeui/kjanuswidget.h
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kjanuswidget.h.orig
|
||||||
|
+++ kdeui/kjanuswidget.h
|
||||||
|
@@ -71,6 +71,8 @@ class KDEUI_EXPORT KJanusWidget : public
|
||||||
|
private:
|
||||||
|
class IconListBox : public KListBox
|
||||||
|
{
|
||||||
|
+ friend class KJanusWidget;
|
||||||
|
+
|
||||||
|
public:
|
||||||
|
IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 );
|
||||||
|
void updateMinimumHeight();
|
||||||
|
@@ -79,10 +81,15 @@ class KDEUI_EXPORT KJanusWidget : public
|
||||||
|
void invalidateWidth();
|
||||||
|
void setShowAll( bool showAll );
|
||||||
|
|
||||||
|
+ protected:
|
||||||
|
+ void slotOnItem( QListBoxItem *item );
|
||||||
|
+ virtual void leaveEvent( QEvent * );
|
||||||
|
+
|
||||||
|
private:
|
||||||
|
bool mShowAll;
|
||||||
|
bool mHeightValid;
|
||||||
|
bool mWidthValid;
|
||||||
|
+ QListBoxItem *mOldItem;
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
@@ -558,6 +565,8 @@ class KDEUI_EXPORT KJanusWidget : public
|
||||||
|
private slots:
|
||||||
|
bool slotShowPage();
|
||||||
|
void slotFontChanged();
|
||||||
|
+
|
||||||
|
+ void slotOnItem(QListBoxItem *item);
|
||||||
|
void slotItemClicked(QListViewItem *it);
|
||||||
|
void pageGone(QObject *obj); // signal from the added page's "destroyed" signal
|
||||||
|
void slotReopen(QListViewItem *item);
|
@ -0,0 +1,21 @@
|
|||||||
|
Index: kdeui/kaboutdialog.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kaboutdialog.cpp.orig
|
||||||
|
+++ kdeui/kaboutdialog.cpp
|
||||||
|
@@ -40,6 +40,7 @@
|
||||||
|
#include <kaboutdialog.h>
|
||||||
|
#include <kaboutdialog_private.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
+#include <config.h>
|
||||||
|
|
||||||
|
//MOC_SKIP_BEGIN
|
||||||
|
template class QPtrList<KAboutContributor>;
|
||||||
|
@@ -702,7 +703,7 @@ void KAboutContainerBase::setProduct( co
|
||||||
|
kdDebug(291) << "no kapp" << endl;
|
||||||
|
|
||||||
|
const QString msg1 = i18n("%1 %2 (Using KDE %3)").arg(appName).arg(version).
|
||||||
|
- arg(QString::fromLatin1(KDE_VERSION_STRING));
|
||||||
|
+ arg(QString::fromLatin1(KDE_VERSION_STRING) + " " + QString::fromLatin1(KDE_DISTRIBUTION_TEXT));
|
||||||
|
const QString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").arg('©').arg(year).
|
||||||
|
arg(author) : QString::fromLatin1("");
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
Index: kded/kbuildservicefactory.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kded/kbuildservicefactory.cpp.orig
|
||||||
|
+++ kded/kbuildservicefactory.cpp
|
||||||
|
@@ -158,7 +158,7 @@ KBuildServiceFactory::saveOfferList(QDat
|
||||||
|
KServiceType::Ptr serviceType = KServiceType::serviceType(*it);
|
||||||
|
if (!serviceType)
|
||||||
|
{
|
||||||
|
- kdWarning() << "'"<< service->desktopEntryPath() << "' specifies undefined mimetype/servicetype '"<< (*it) << "'" << endl;
|
||||||
|
+ kdDebug() << "'"<< service->desktopEntryPath() << "' specifies undefined mimetype/servicetype '"<< (*it) << "'" << endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
serviceTypes.append(serviceType);
|
@ -0,0 +1,267 @@
|
|||||||
|
Index: khtml/khtmlview.cpp
|
||||||
|
===================================================================
|
||||||
|
--- khtml/khtmlview.cpp.orig
|
||||||
|
+++ khtml/khtmlview.cpp
|
||||||
|
@@ -151,6 +151,9 @@ public:
|
||||||
|
|
||||||
|
KHTMLViewPrivate()
|
||||||
|
: underMouse( 0 ), underMouseNonShared( 0 ), visibleWidgets( 107 )
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+ , dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
#ifndef KHTML_NO_CARET
|
||||||
|
m_caretViewContext = 0;
|
||||||
|
@@ -396,6 +399,17 @@ public:
|
||||||
|
short m_mouseScroll_byY;
|
||||||
|
QTimer *m_mouseScrollTimer;
|
||||||
|
QWidget *m_mouseScrollIndicator;
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+ QTimer timer2;
|
||||||
|
+ int dx;
|
||||||
|
+ int dy;
|
||||||
|
+ // Step size * 16 and residual to avoid huge difference between 1px/step and 2px/step
|
||||||
|
+ int ddx;
|
||||||
|
+ int ddy;
|
||||||
|
+ int rdx;
|
||||||
|
+ int rdy;
|
||||||
|
+ bool scrolling;
|
||||||
|
+#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifndef QT_NO_TOOLTIP
|
||||||
|
@@ -504,6 +518,11 @@ KHTMLView::KHTMLView( KHTMLPart *part, Q
|
||||||
|
init();
|
||||||
|
|
||||||
|
viewport()->show();
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+#define timer timer2
|
||||||
|
+ connect(&d->timer, SIGNAL(timeout()), this, SLOT(scrollTick()));
|
||||||
|
+#undef timer
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
KHTMLView::~KHTMLView()
|
||||||
|
@@ -1544,7 +1563,7 @@ void KHTMLView::keyPressEvent( QKeyEvent
|
||||||
|
case Key_Down:
|
||||||
|
case Key_J:
|
||||||
|
if (!d->scrollTimerId || d->scrollSuspended)
|
||||||
|
- scrollBy( 0, 10 );
|
||||||
|
+ scrollBy( 0, 10 * _ke->count() );
|
||||||
|
if (d->scrollTimerId)
|
||||||
|
d->newScrollTimer(this, 0);
|
||||||
|
break;
|
||||||
|
@@ -1559,7 +1578,7 @@ void KHTMLView::keyPressEvent( QKeyEvent
|
||||||
|
case Key_Up:
|
||||||
|
case Key_K:
|
||||||
|
if (!d->scrollTimerId || d->scrollSuspended)
|
||||||
|
- scrollBy( 0, -10 );
|
||||||
|
+ scrollBy( 0, -10 * _ke->count());
|
||||||
|
if (d->scrollTimerId)
|
||||||
|
d->newScrollTimer(this, 0);
|
||||||
|
break;
|
||||||
|
@@ -1572,14 +1591,14 @@ void KHTMLView::keyPressEvent( QKeyEvent
|
||||||
|
case Key_Right:
|
||||||
|
case Key_L:
|
||||||
|
if (!d->scrollTimerId || d->scrollSuspended)
|
||||||
|
- scrollBy( 10, 0 );
|
||||||
|
+ scrollBy( 10 * _ke->count(), 0 );
|
||||||
|
if (d->scrollTimerId)
|
||||||
|
d->newScrollTimer(this, 0);
|
||||||
|
break;
|
||||||
|
case Key_Left:
|
||||||
|
case Key_H:
|
||||||
|
if (!d->scrollTimerId || d->scrollSuspended)
|
||||||
|
- scrollBy( -10, 0 );
|
||||||
|
+ scrollBy( -10 * _ke->count(), 0 );
|
||||||
|
if (d->scrollTimerId)
|
||||||
|
d->newScrollTimer(this, 0);
|
||||||
|
break;
|
||||||
|
@@ -1712,8 +1731,16 @@ void KHTMLView::keyReleaseEvent(QKeyEven
|
||||||
|
d->scrollSuspendPreActivate = false;
|
||||||
|
if( _ke->key() == Key_Shift && d->scrollSuspendPreActivate && _ke->state() == Qt::ShiftButton
|
||||||
|
&& !(KApplication::keyboardMouseState() & Qt::ShiftButton))
|
||||||
|
+ {
|
||||||
|
if (d->scrollTimerId)
|
||||||
|
- d->scrollSuspended = !d->scrollSuspended;
|
||||||
|
+ {
|
||||||
|
+ d->scrollSuspended = !d->scrollSuspended;
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+ if( d->scrollSuspended )
|
||||||
|
+ stopScrolling();
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (d->accessKeysEnabled)
|
||||||
|
{
|
||||||
|
@@ -3259,7 +3286,11 @@ void KHTMLView::viewportWheelEvent(QWhee
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d->scrollBarMoved = true;
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+ scrollViewWheelEvent( e );
|
||||||
|
+#else
|
||||||
|
QScrollView::viewportWheelEvent( e );
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
QMouseEvent *tempEvent = new QMouseEvent( QEvent::MouseMove, QPoint(-1,-1), QPoint(-1,-1), Qt::NoButton, e->state() );
|
||||||
|
emit viewportMouseMoveEvent ( tempEvent );
|
||||||
|
@@ -4462,4 +4493,117 @@ void KHTMLView::moveCaretToLineEnd()
|
||||||
|
|
||||||
|
#endif // KHTML_NO_CARET
|
||||||
|
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+#define timer timer2
|
||||||
|
+
|
||||||
|
+// All scrolls must be completed within 240ms of last keypress
|
||||||
|
+static const int SCROLL_TIME = 240;
|
||||||
|
+// Each step is 20 ms == 50 frames/second
|
||||||
|
+static const int SCROLL_TICK = 20;
|
||||||
|
+
|
||||||
|
+void KHTMLView::scrollBy(int dx, int dy)
|
||||||
|
+{
|
||||||
|
+ KConfigGroup cfg( KGlobal::config(), "KDE" );
|
||||||
|
+ if( !cfg.readBoolEntry( "SmoothScrolling", true )) {
|
||||||
|
+ QScrollView::scrollBy( dx, dy );
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ // scrolling destination
|
||||||
|
+ int full_dx = d->dx + dx;
|
||||||
|
+ int full_dy = d->dy + dy;
|
||||||
|
+
|
||||||
|
+ // scrolling speed
|
||||||
|
+ int ddx = 0;
|
||||||
|
+ int ddy = 0;
|
||||||
|
+
|
||||||
|
+ int steps = SCROLL_TIME/SCROLL_TICK;
|
||||||
|
+
|
||||||
|
+ ddx = (full_dx*16)/steps;
|
||||||
|
+ ddy = (full_dy*16)/steps;
|
||||||
|
+
|
||||||
|
+ // don't go under 1px/step
|
||||||
|
+ if (ddx > 0 && ddx < 16) ddx = 16;
|
||||||
|
+ if (ddy > 0 && ddy < 16) ddy = 16;
|
||||||
|
+ if (ddx < 0 && ddx > -16) ddx = -16;
|
||||||
|
+ if (ddy < 0 && ddy > -16) ddy = -16;
|
||||||
|
+
|
||||||
|
+ d->dx = full_dx;
|
||||||
|
+ d->dy = full_dy;
|
||||||
|
+ d->ddx = ddx;
|
||||||
|
+ d->ddy = ddy;
|
||||||
|
+
|
||||||
|
+ if (!d->scrolling) {
|
||||||
|
+ scrollTick();
|
||||||
|
+ startScrolling();
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void KHTMLView::scrollTick() {
|
||||||
|
+ if (d->dx == 0 && d->dy == 0) {
|
||||||
|
+ stopScrolling();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ int tddx = d->ddx + d->rdx;
|
||||||
|
+ int tddy = d->ddy + d->rdy;
|
||||||
|
+
|
||||||
|
+ int ddx = tddx / 16;
|
||||||
|
+ int ddy = tddy / 16;
|
||||||
|
+ d->rdx = tddx % 16;
|
||||||
|
+ d->rdy = tddy % 16;
|
||||||
|
+
|
||||||
|
+ if (d->dx > 0 && ddx > d->dx) ddx = d->dx;
|
||||||
|
+ else
|
||||||
|
+ if (d->dx < 0 && ddx < d->dx) ddx = d->dx;
|
||||||
|
+
|
||||||
|
+ if (d->dy > 0 && ddy > d->dy) ddy = d->dy;
|
||||||
|
+ else
|
||||||
|
+ if (d->dy < 0 && ddy < d->dy) ddy = d->dy;
|
||||||
|
+
|
||||||
|
+ d->dx -= ddx;
|
||||||
|
+ d->dy -= ddy;
|
||||||
|
+
|
||||||
|
+// QScrollView::setContentsPos( contentsX() + ddx, contentsY() + ddy);
|
||||||
|
+ kapp->syncX();
|
||||||
|
+ QScrollView::scrollBy(ddx, ddy);
|
||||||
|
+// Unaccelerated X can get seriously overloaded by scrolling and for some reason
|
||||||
|
+// will send KeyPress events only infrequently. This should help to reduce
|
||||||
|
+// the load.
|
||||||
|
+ kapp->syncX();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void KHTMLView::startScrolling()
|
||||||
|
+{
|
||||||
|
+ d->scrolling = true;
|
||||||
|
+ d->timer.start(SCROLL_TICK, false);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void KHTMLView::stopScrolling()
|
||||||
|
+{
|
||||||
|
+ d->timer.stop();
|
||||||
|
+ d->dx = d->dy = 0;
|
||||||
|
+ d->scrolling = false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+// Overloaded from QScrollView and QScrollBar
|
||||||
|
+void KHTMLView::scrollViewWheelEvent( QWheelEvent *e )
|
||||||
|
+{
|
||||||
|
+ int pageStep = verticalScrollBar()->pageStep();
|
||||||
|
+ int lineStep = verticalScrollBar()->lineStep();
|
||||||
|
+ int step = QMIN( QApplication::wheelScrollLines()*lineStep, pageStep );
|
||||||
|
+ if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) )
|
||||||
|
+ step = pageStep;
|
||||||
|
+
|
||||||
|
+ if(e->orientation() == Horizontal)
|
||||||
|
+ scrollBy(-((e->delta()*step)/120), 0);
|
||||||
|
+ else if(e->orientation() == Vertical)
|
||||||
|
+ scrollBy(0,-((e->delta()*step)/120));
|
||||||
|
+
|
||||||
|
+ e->accept();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#undef timer
|
||||||
|
+
|
||||||
|
+#endif // NO_SMOOTH_SCROLL_HACK
|
||||||
|
+
|
||||||
|
#undef DEBUG_CARETMODE
|
||||||
|
Index: khtml/khtmlview.h
|
||||||
|
===================================================================
|
||||||
|
--- khtml/khtmlview.h.orig
|
||||||
|
+++ khtml/khtmlview.h
|
||||||
|
@@ -181,6 +181,11 @@ signals:
|
||||||
|
void hideAccessKeys();
|
||||||
|
void repaintAccessKeys();
|
||||||
|
void findAheadActive( bool );
|
||||||
|
+//#define NO_SMOOTH_SCROLL_HACK
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+public slots:
|
||||||
|
+ void scrollBy(int dx, int dy);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void clear();
|
||||||
|
@@ -211,9 +216,23 @@ protected:
|
||||||
|
void contentsContextMenuEvent ( QContextMenuEvent *_ce );
|
||||||
|
void doAutoScroll();
|
||||||
|
void timerEvent ( QTimerEvent * );
|
||||||
|
+
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+ void startScrolling();
|
||||||
|
+ void stopScrolling();
|
||||||
|
+#ifndef QT_NO_WHEELEVENT
|
||||||
|
+ void scrollViewWheelEvent( QWheelEvent* e );
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
protected slots:
|
||||||
|
void slotPaletteChanged();
|
||||||
|
void slotScrollBarMoved();
|
||||||
|
+#ifndef NO_SMOOTH_SCROLL_HACK
|
||||||
|
+ void scrollTick();
|
||||||
|
+#else
|
||||||
|
+ void scrollTick() {}; // moc cannot handle #if
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void tripleClickTimeout();
|
@ -0,0 +1,26 @@
|
|||||||
|
Index: kdeui/ksconfig.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/ksconfig.cpp.orig
|
||||||
|
+++ kdeui/ksconfig.cpp
|
||||||
|
@@ -187,7 +187,7 @@ KSpellConfig::readGlobalSettings()
|
||||||
|
setRunTogether ( kc->readNumEntry("KSpell_RunTogether", 0) );
|
||||||
|
setDictionary ( kc->readEntry("KSpell_Dictionary") );
|
||||||
|
setDictFromList ( kc->readNumEntry("KSpell_DictFromList", false) );
|
||||||
|
- setEncoding ( kc->readNumEntry ("KSpell_Encoding", KS_E_ASCII) );
|
||||||
|
+ setEncoding ( kc->readNumEntry ("KSpell_Encoding", KS_E_UTF8) );
|
||||||
|
setClient ( kc->readNumEntry ("KSpell_Client", KS_CLIENT_ISPELL) );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
Index: kdeui/ksyntaxhighlighter.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/ksyntaxhighlighter.cpp.orig
|
||||||
|
+++ kdeui/ksyntaxhighlighter.cpp
|
||||||
|
@@ -551,7 +551,7 @@ QString KDictSpellingHighlighter::spellK
|
||||||
|
key += '/';
|
||||||
|
key += QString::number( config->readNumEntry( "KSpell_DictFromList", false ));
|
||||||
|
key += '/';
|
||||||
|
- key += QString::number( config->readNumEntry( "KSpell_Encoding", KS_E_ASCII ));
|
||||||
|
+ key += QString::number( config->readNumEntry( "KSpell_Encoding", KS_E_UTF8 ));
|
||||||
|
key += '/';
|
||||||
|
key += QString::number( config->readNumEntry( "KSpell_Client", KS_CLIENT_ISPELL ));
|
||||||
|
return key;
|
@ -0,0 +1,14 @@
|
|||||||
|
Index: kio/kio/kdirwatch.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kdirwatch.cpp.orig
|
||||||
|
+++ kio/kio/kdirwatch.cpp
|
||||||
|
@@ -743,7 +743,8 @@ bool KDirWatchPrivate::useINotify( Entry
|
||||||
|
|
||||||
|
bool KDirWatchPrivate::useStat(Entry* e)
|
||||||
|
{
|
||||||
|
- if (KIO::probably_slow_mounted(e->path))
|
||||||
|
+ if ( e->path.startsWith("/media/") || (e->path == "/media")
|
||||||
|
+ || (KIO::probably_slow_mounted(e->path)) )
|
||||||
|
useFreq(e, m_nfsPollInterval);
|
||||||
|
else
|
||||||
|
useFreq(e, m_PollInterval);
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,118 @@
|
|||||||
|
#
|
||||||
|
# spec file for package kdelibs3-devel-doc
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
# norootforbuild
|
||||||
|
|
||||||
|
|
||||||
|
Name: kdelibs3-devel-doc
|
||||||
|
BuildRequires: OpenEXR-devel aspell-devel cups-devel db-devel doxygen graphviz kdelibs3-devel krb5-devel libjasper libsndfile openldap2-devel qt3-devel-doc utempter xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-scalable
|
||||||
|
%if %suse_version > 1020
|
||||||
|
BuildRequires: avahi-compat-mDNSResponder-devel fdupes
|
||||||
|
%else
|
||||||
|
BuildRequires: mDNSResponder-devel
|
||||||
|
%endif
|
||||||
|
Url: http://www.kde.org
|
||||||
|
License: GPLv2+
|
||||||
|
Group: Documentation/HTML
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
Summary: Additional Package Documentation
|
||||||
|
Version: 3.5.10
|
||||||
|
Release: 44
|
||||||
|
%define kdelibs_patch_level b
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: kdelibs3 qt3-devel-doc
|
||||||
|
Source0: kdelibs-%{version}.tar.bz2
|
||||||
|
Source1: create-kdeapi
|
||||||
|
Source4: api_docu_description
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package contains a generated API documentation for all library
|
||||||
|
classes provided by kdelibs. The index page for all KDE API functions
|
||||||
|
is:
|
||||||
|
|
||||||
|
file:/usr/share/doc/KDE3-API/index.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
The KDE Team <kde@kde.org>
|
||||||
|
|
||||||
|
%prep
|
||||||
|
echo %suse_version
|
||||||
|
%setup -q -n kdelibs-%{version}
|
||||||
|
. /etc/opt/kde3/common_options
|
||||||
|
update_admin --no-unsermake
|
||||||
|
|
||||||
|
%build
|
||||||
|
. /etc/opt/kde3/common_options
|
||||||
|
export QTDOCDIR=/usr/share/doc/packages/qt3/html
|
||||||
|
./configure $configkde --with-distribution="$DISTRI" --enable-libsuffix=`/opt/kde3/bin/kde-config --libsuffix`
|
||||||
|
do_make apidox
|
||||||
|
|
||||||
|
%install
|
||||||
|
. /etc/opt/kde3/common_options
|
||||||
|
list=`find . -name Makefile.am | xargs grep Doxy | sed -e "s,/Makefile.am.*,," | sort -u `
|
||||||
|
for i in $list; do do_make -C $i DESTDIR=$RPM_BUILD_ROOT install-apidox || true; done
|
||||||
|
# The modern way, with kdevelop-incompatible api documentation :/
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/KDE3-API/
|
||||||
|
# *** everytime you edit the following line, you made a mistake. Update admin tarball
|
||||||
|
# *** version instead
|
||||||
|
KDEDOCDIR=$kde_htmldir/en/kdelibs-apidocs
|
||||||
|
# this is forgotten, but kdevelop needs it
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/$KDEDOCDIR
|
||||||
|
if test -d apidocs/qt; then
|
||||||
|
cp -a apidocs/qt $RPM_BUILD_ROOT/$KDEDOCDIR
|
||||||
|
fi
|
||||||
|
set +x
|
||||||
|
exitc=0
|
||||||
|
for i in `ls -1 $RPM_BUILD_ROOT/$KDEDOCDIR/*/html/index.html`; do
|
||||||
|
lib=`echo $i | sed -e 's,/html/index.html,,; s,.*/\([^/]*\)$,\1,'`
|
||||||
|
if ! egrep "^$lib:" %SOURCE4 ; then
|
||||||
|
echo "ERROR: no description for library $lib"
|
||||||
|
exitc=1
|
||||||
|
fi
|
||||||
|
sed -n -e 's@'"${lib}"':\(.*\)@\1@p' %SOURCE4 > ${RPM_BUILD_ROOT}/${KDEDOCDIR}/${lib}/description.SuSE
|
||||||
|
echo "kdelibs" > ${RPM_BUILD_ROOT}/${KDEDOCDIR}/${lib}/package.SuSE
|
||||||
|
done
|
||||||
|
if test "$exitc" != 0; then
|
||||||
|
exit $exitc
|
||||||
|
fi
|
||||||
|
ln -s $KDEDOCDIR/index.html $RPM_BUILD_ROOT/usr/share/doc/KDE3-API/index.html
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}/opt/kde3/share/apps
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/apps/kdelibs
|
||||||
|
install -m 0755 %SOURCE1 $RPM_BUILD_ROOT/opt/kde3/share/apps/kdelibs/
|
||||||
|
%if %suse_version > 1020
|
||||||
|
%fdupes -s $RPM_BUILD_ROOT
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post
|
||||||
|
/opt/kde3/share/apps/kdelibs/create-kdeapi
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir /opt/kde3/share
|
||||||
|
%dir /opt/kde3/share/apps
|
||||||
|
%dir /opt/kde3/share/apps/kdelibs
|
||||||
|
/usr/share/doc/KDE3-API
|
||||||
|
/opt/kde3/share/apps/kdelibs/create-kdeapi
|
||||||
|
/opt/kde3/share/doc
|
||||||
|
|
||||||
|
%changelog
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,892 @@
|
|||||||
|
#
|
||||||
|
# spec file for package kdelibs3
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
# norootforbuild
|
||||||
|
|
||||||
|
|
||||||
|
Name: kdelibs3
|
||||||
|
BuildRequires: OpenEXR-devel arts-devel aspell-devel cups-devel fam-devel flac-devel krb5-devel
|
||||||
|
BuildRequires: libart_lgpl-devel libidn-devel libsndfile libtiff-devel
|
||||||
|
BuildRequires: libxslt-devel openldap2-devel pcre-devel qt3-devel sgml-skel
|
||||||
|
BuildRequires: db-devel libacl-devel libattr-devel unsermake update-desktop-files utempter
|
||||||
|
BuildRequires: unzip
|
||||||
|
%if %suse_version > 1020
|
||||||
|
BuildRequires: avahi-compat-mDNSResponder-devel fdupes libbz2-devel libjasper-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: libjasper mDNSResponder-devel
|
||||||
|
%endif
|
||||||
|
%if %suse_version > 1000
|
||||||
|
BuildRequires: libdrm-devel
|
||||||
|
%endif
|
||||||
|
Url: http://www.kde.org
|
||||||
|
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+
|
||||||
|
Group: System/GUI/KDE
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
Summary: KDE Base Libraries
|
||||||
|
Version: 3.5.10
|
||||||
|
Release: 47
|
||||||
|
Obsoletes: kde3-i18n kups keramik kdelibs3-cups kdelibs3-33addons kdepim3-networkstatus
|
||||||
|
Provides: kups keramik kdelibs3-cups kdelibs3-33addons kdepim3-networkstatus
|
||||||
|
Provides: kdelibs3_base = 3.3
|
||||||
|
# bug437293
|
||||||
|
%ifarch ppc64
|
||||||
|
Obsoletes: kdelibs3-64bit
|
||||||
|
%endif
|
||||||
|
#
|
||||||
|
Requires: qt3 >= %( echo `rpm -q --queryformat '%{VERSION}' qt3`)
|
||||||
|
Requires: openssl kdelibs3-default-style
|
||||||
|
%if %suse_version > 1020
|
||||||
|
Requires: hicolor-icon-theme
|
||||||
|
%endif
|
||||||
|
%if %suse_version > 1000
|
||||||
|
Recommends: ispell enscript
|
||||||
|
%endif
|
||||||
|
%if %suse_version > 1010
|
||||||
|
Requires: sudo
|
||||||
|
%endif
|
||||||
|
Source0: kdelibs-%{version}.tar.bz2
|
||||||
|
Source2: do_make
|
||||||
|
Source3: baselibs.conf
|
||||||
|
Source4: api_docu_description
|
||||||
|
Source6: kde3rc
|
||||||
|
Source7: common_options
|
||||||
|
# svn export svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
|
||||||
|
Source8: admin.tar.bz2
|
||||||
|
Source9: cr16-filesys-file_broken.png
|
||||||
|
Source10: kdemm-20050330.tar.bz2
|
||||||
|
Source11: 10888-bt.tar.gz
|
||||||
|
Source12: mimetype-icons.tar.bz2
|
||||||
|
Source14: vnd.openxmlformats-officedocument.wordprocessingml.document.desktop
|
||||||
|
Source15: vnd.openxmlformats-officedocument.presentationml.presentation.desktop
|
||||||
|
Source16: vnd.openxmlformats-officedocument.spreadsheetml.sheet.desktop
|
||||||
|
Patch0: 3_5_BRANCH.diff
|
||||||
|
Patch1: kdeversion.diff
|
||||||
|
Patch2: admin.diff
|
||||||
|
Patch3: show-distribution.diff
|
||||||
|
Patch5: applications.menu-fallback.diff
|
||||||
|
Patch7: stat-on-media.diff
|
||||||
|
Patch8: kmimelist.diff
|
||||||
|
Patch9: x-kde-InitialPreference.diff
|
||||||
|
Patch10: disable-idn-support.diff
|
||||||
|
Patch11: silence.diff
|
||||||
|
Patch12: smooth-scrolling.diff
|
||||||
|
Patch13: rubberband-selection.diff
|
||||||
|
Patch15: add-suse-translations.diff
|
||||||
|
Patch16: kde3rc.dif
|
||||||
|
Patch17: artwork.diff
|
||||||
|
Patch26: mimetype-changes.diff
|
||||||
|
Patch27: noauto-package.diff
|
||||||
|
Patch29: prefer_distribution_settings.dif
|
||||||
|
Patch34: allow-man-setgid.diff
|
||||||
|
Patch40: clever-menu.diff
|
||||||
|
Patch43: fileshare.diff
|
||||||
|
Patch44: fontconfig-reverse-lookup.diff
|
||||||
|
Patch45: limit-max-image-size.diff
|
||||||
|
Patch50: fix-gnome-help-support.diff
|
||||||
|
Patch950: fix-gnome-help-support_legacy.diff
|
||||||
|
Patch52: kdeprint-restart-cupsd.diff
|
||||||
|
Patch54: kdemm.diff
|
||||||
|
Patch55: fix-kdemm-build.diff
|
||||||
|
Patch56: fix-dcopidlng-within-kdelibs-build.diff
|
||||||
|
Patch57: kdemm-filepreview.diff
|
||||||
|
Patch60: fix-qxembed.diff
|
||||||
|
Patch65: integrate-global-pixmaps-new.diff
|
||||||
|
Patch66: integrate-global-pixmaps-10.1.diff
|
||||||
|
Patch70: ktip-icon-hack.diff
|
||||||
|
Patch80: CATALOG.kdelibs3.diff
|
||||||
|
Patch81: xml-catalog.diff
|
||||||
|
Patch83: kdelibs3-gcc-4.1-miscompile.diff
|
||||||
|
Patch85: desktop-translations.diff
|
||||||
|
Patch86: use-xauthlocalhostname.diff
|
||||||
|
Patch88: mozilla-sliders.patch
|
||||||
|
Patch89: kdeprint-utf8.diff
|
||||||
|
Patch90: kimproxy-warning.diff
|
||||||
|
Patch95: kdelibs_networkstatus_branch2.diff
|
||||||
|
Patch97: autostart-spec.diff
|
||||||
|
Patch105: kdelibs3-hicolor-scalable-sizes.patch
|
||||||
|
Patch106: use-mediamanager.diff
|
||||||
|
Patch108: patch-mimetype-iconnames.diff
|
||||||
|
Patch109: fix-kerberos-printing.diff
|
||||||
|
Patch110: printpreview.patch
|
||||||
|
Patch111: kfile-beagle.diff
|
||||||
|
Patch112: xinerama.patch
|
||||||
|
Patch113: kremoteencoding-utf8.diff
|
||||||
|
Patch114: no-progress-for-beagle-status-query.diff
|
||||||
|
Patch117: kickoff-drop-shadow.diff
|
||||||
|
Patch122: disable-samba-dialog-without-smb.diff
|
||||||
|
Patch123: lpoptions-cups-1.2.diff
|
||||||
|
Patch124: spellcheck-default-utf8.diff
|
||||||
|
Patch125: kde4-applications.diff
|
||||||
|
Patch126: avahi-pidfile.diff
|
||||||
|
Patch127: x-jar-desktop.diff
|
||||||
|
Patch128: google-mail.diff
|
||||||
|
Patch129: default-useragent.diff
|
||||||
|
Patch130: kwalletd-try-open.diff
|
||||||
|
Patch131: textcompletion-editor.diff
|
||||||
|
Patch132: no-debug-by-default.diff
|
||||||
|
Patch133: flash-player-non-oss.diff
|
||||||
|
Patch134: bundle-locale-help.diff
|
||||||
|
Patch149: networkstatus.diff
|
||||||
|
Patch150: kdesu-settings.diff
|
||||||
|
Patch152: bug-399296_ftphandling-fix.diff
|
||||||
|
Patch153: bug-382959_kabc_fix_vcardparser.patch
|
||||||
|
Patch154: r874968-ebay-crash.diff
|
||||||
|
Patch155: gcc44.diff
|
||||||
|
Patch156: fix-macmenu.patch
|
||||||
|
Patch157: ignore-inline-menu.diff
|
||||||
|
Patch158: bnc557126.diff
|
||||||
|
Patch159: xmlhttprequest_3.x.diff
|
||||||
|
Patch160: kdecode_fakes_include.diff
|
||||||
|
Patch161: gcc45.diff
|
||||||
|
Patch162: arts-acinclude.patch
|
||||||
|
Patch163: kdelibs-3.5.10-ossl-1.x.patch
|
||||||
|
Patch164: light_v_2_scrollbar_patch.patch
|
||||||
|
|
||||||
|
Patch201: kdelibs-3.5.4-CVE-2009-1690.patch
|
||||||
|
Patch203: kdelibs-3.5.10-latex-syntax-kile-2.0.3.patch
|
||||||
|
Patch204: kdelibs-3.5.10-CVE-2009-2702.patch
|
||||||
|
Patch205: kdelibs-3.5.10-cve-2009-2537-select-length.patch
|
||||||
|
Patch206: kdelibs-3.5.10-cve-2009-1725.patch
|
||||||
|
Patch207: kdelibs-3.5.10-cve-2009-1698.patch
|
||||||
|
|
||||||
|
Patch210: kdelibs-3.5.10-kio.patch
|
||||||
|
Patch211: oom_score_adj.patch
|
||||||
|
Patch212: kcontrol_crash_patch.diff
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package contains kdelibs, one of the basic packages of the K
|
||||||
|
Desktop Environment. It contains the necessary libraries for the KDE
|
||||||
|
desktop.
|
||||||
|
|
||||||
|
This package is absolutely necessary for using KDE.
|
||||||
|
|
||||||
|
%package arts
|
||||||
|
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+
|
||||||
|
Summary: KDE aRts support
|
||||||
|
Group: System/GUI/KDE
|
||||||
|
Provides: kdelibs3:/opt/kde3/bin/artsmessage
|
||||||
|
# bug437293
|
||||||
|
%ifarch ppc64
|
||||||
|
Obsoletes: kdelibs3-arts-64bit
|
||||||
|
%endif
|
||||||
|
#
|
||||||
|
Requires: arts >= %( echo `rpm -q --queryformat '%{VERSION}' arts`)
|
||||||
|
%if %suse_version > 1000
|
||||||
|
Recommends: kdemultimedia3-arts
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description arts
|
||||||
|
This package contains bindings and gui elements for using aRts sound
|
||||||
|
daemon.
|
||||||
|
|
||||||
|
%package default-style
|
||||||
|
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+
|
||||||
|
Summary: The default KDE style
|
||||||
|
Group: System/GUI/KDE
|
||||||
|
Provides: kdelibs3:/opt/kde3/%_lib/libkdefx.so.4
|
||||||
|
|
||||||
|
%description default-style
|
||||||
|
This package contains the Plastik widget style and libkdefx. It only
|
||||||
|
depends on Qt, not the KDE libraries.
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+
|
||||||
|
Summary: Documentation for KDE Base Libraries
|
||||||
|
Group: System/GUI/KDE
|
||||||
|
Provides: kdelibs3:/opt/kde3/share/apps/ksgmltools2
|
||||||
|
Provides: kdelibs3_doc
|
||||||
|
Requires: sgml-skel libxml2
|
||||||
|
%define regcat /usr/bin/sgml-register-catalog
|
||||||
|
PreReq: %{regcat} /usr/bin/xmlcatalog /usr/bin/edit-xml-catalog
|
||||||
|
PreReq: sed grep awk
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
This package contains the core environment and templates for the KDE
|
||||||
|
help system.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+
|
||||||
|
# usefiles /opt/kde3/bin/dcopidl /opt/kde3/bin/dcopidl2cpp /opt/kde3/bin/kdb2html /opt/kde3/bin/preparetips
|
||||||
|
Requires: qt3-devel libvorbis-devel kdelibs3 = %version autoconf automake libxslt-devel libxml2-devel libart_lgpl-devel libjpeg-devel
|
||||||
|
# next line from kde3-devel-packages macro
|
||||||
|
Requires: kdelibs3-doc libtiff-devel openssl-devel update-desktop-files
|
||||||
|
%if %suse_version > 1000
|
||||||
|
Requires: libdrm-devel dbus-1-qt3-devel
|
||||||
|
%else
|
||||||
|
Requires: dbus-1-qt
|
||||||
|
%endif
|
||||||
|
Requires: libattr-devel libacl-devel
|
||||||
|
%if %suse_version > 1020
|
||||||
|
Requires: avahi-compat-mDNSResponder-devel libbz2-devel
|
||||||
|
%else
|
||||||
|
Requires: mDNSResponder-devel
|
||||||
|
%endif
|
||||||
|
Requires: kdelibs3-arts
|
||||||
|
Summary: KDE Base Package: Build Environment
|
||||||
|
Group: System/GUI/KDE
|
||||||
|
Requires: fam-devel pcre-devel libidn-devel arts-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains all necessary include files and libraries needed
|
||||||
|
to develop applications that require these.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
echo %suse_version
|
||||||
|
%setup -q -n kdelibs-%{version}
|
||||||
|
%patch0
|
||||||
|
%patch1
|
||||||
|
%patch3
|
||||||
|
%patch5
|
||||||
|
%patch7
|
||||||
|
%patch10
|
||||||
|
%patch11
|
||||||
|
%patch12
|
||||||
|
%patch13
|
||||||
|
%patch15
|
||||||
|
%patch16
|
||||||
|
%patch17
|
||||||
|
%patch26
|
||||||
|
%patch27
|
||||||
|
%patch29
|
||||||
|
#%patch43
|
||||||
|
#disable it because of BIC
|
||||||
|
#%patch45
|
||||||
|
%if %suse_version > 1020
|
||||||
|
%patch50
|
||||||
|
%else
|
||||||
|
%patch950
|
||||||
|
%endif
|
||||||
|
%patch52
|
||||||
|
%patch34
|
||||||
|
%patch44
|
||||||
|
%patch40
|
||||||
|
%patch8
|
||||||
|
%patch9
|
||||||
|
tar xfvj %SOURCE10
|
||||||
|
# TODO!
|
||||||
|
%patch54
|
||||||
|
%patch55
|
||||||
|
%patch56
|
||||||
|
%patch57
|
||||||
|
%patch60
|
||||||
|
# 10.2 goes back to the version without suseadds
|
||||||
|
%if %suse_version > 1010
|
||||||
|
%patch65
|
||||||
|
%else
|
||||||
|
%if %suse_version > 1000
|
||||||
|
%patch66
|
||||||
|
%else
|
||||||
|
%patch65
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
%patch70
|
||||||
|
rm -rf admin
|
||||||
|
bunzip2 -cd %{SOURCE8} | tar xfv - --exclude=.cvsignore --exclude=CVS
|
||||||
|
install -m 755 %{SOURCE2} admin
|
||||||
|
%patch2
|
||||||
|
%patch80 -p 1
|
||||||
|
%patch81
|
||||||
|
%if %suse_version > 1000
|
||||||
|
%patch83
|
||||||
|
%endif
|
||||||
|
%patch85
|
||||||
|
%patch86
|
||||||
|
%patch88
|
||||||
|
%patch89
|
||||||
|
%patch90
|
||||||
|
%patch95
|
||||||
|
%patch97
|
||||||
|
%if %suse_version < 1030
|
||||||
|
%patch105 -p 1
|
||||||
|
%endif
|
||||||
|
%patch106
|
||||||
|
%patch108
|
||||||
|
%patch109
|
||||||
|
%patch110
|
||||||
|
%patch111
|
||||||
|
%patch112
|
||||||
|
%patch113
|
||||||
|
%patch114
|
||||||
|
%patch117
|
||||||
|
%patch122
|
||||||
|
%if %suse_version > 1010
|
||||||
|
%patch123
|
||||||
|
%endif
|
||||||
|
%patch124
|
||||||
|
%patch125
|
||||||
|
%patch126
|
||||||
|
%patch127
|
||||||
|
%patch128
|
||||||
|
%patch129
|
||||||
|
%patch130
|
||||||
|
%patch131
|
||||||
|
%patch132
|
||||||
|
%if %suse_version > 1020
|
||||||
|
%patch133
|
||||||
|
%patch134
|
||||||
|
%endif
|
||||||
|
%patch149
|
||||||
|
%patch150
|
||||||
|
%patch152
|
||||||
|
%patch153
|
||||||
|
%patch154
|
||||||
|
%patch155
|
||||||
|
%patch156
|
||||||
|
%if %suse_version > 1110
|
||||||
|
%patch157
|
||||||
|
%endif
|
||||||
|
%patch158
|
||||||
|
%patch159
|
||||||
|
%patch160
|
||||||
|
%patch161
|
||||||
|
%patch162 -p1
|
||||||
|
%patch163 -p1
|
||||||
|
%patch164 -p1
|
||||||
|
%patch201 -p1
|
||||||
|
%patch203 -p1
|
||||||
|
%patch204 -p1
|
||||||
|
%patch205 -p1
|
||||||
|
%patch206
|
||||||
|
%patch207 -p1
|
||||||
|
%patch210 -p1
|
||||||
|
%patch211 -p1
|
||||||
|
%patch212
|
||||||
|
|
||||||
|
tar xfvj %SOURCE12
|
||||||
|
#
|
||||||
|
# define KDE version exactly
|
||||||
|
#
|
||||||
|
myrelease=$(echo %release | cut -d. -f-1)
|
||||||
|
sed 's,#define KDE_VERSION_STRING "\(.*\)",#define KDE_VERSION_STRING "\1 \\"release '$myrelease'\\"",' kdecore/kdeversion.h > kdecore/kdeversion.h_ && mv kdecore/kdeversion.h_ kdecore/kdeversion.h
|
||||||
|
#
|
||||||
|
# create build enviroment
|
||||||
|
#
|
||||||
|
UNSERMAKE=yes make -f admin/Makefile.common cvs
|
||||||
|
|
||||||
|
%build
|
||||||
|
export PATH=$PWD/admin/:$PATH
|
||||||
|
FINAL="--enable-final"
|
||||||
|
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||||
|
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
|
||||||
|
%ifarch armv4l
|
||||||
|
FINAL=""
|
||||||
|
CXXFLAGS="$CXXFLAGS -O0"
|
||||||
|
%endif
|
||||||
|
FLAGS="$FLAGS --with-pcsc-dir=/usr "
|
||||||
|
FLAGS="$FLAGS --disable-rpath"
|
||||||
|
OPTIONS="$FLAGS $FINAL \
|
||||||
|
--prefix=/opt/kde3 \
|
||||||
|
--with-qt-dir=/usr/lib/qt3 \
|
||||||
|
--enable-threading \
|
||||||
|
--enable-mt \
|
||||||
|
--with-xinerama \
|
||||||
|
--with-ssl-dir=/usr/ssl \
|
||||||
|
--mandir=%_mandir \
|
||||||
|
--sysconfdir=%_sysconfdir \
|
||||||
|
--enable-new-ldflags"
|
||||||
|
#
|
||||||
|
# common_options
|
||||||
|
#
|
||||||
|
sed -e 's,@_lib@,%_lib,g' -e "s,@configkde@,$OPTIONS,g" \
|
||||||
|
%{SOURCE7} > ../common_options
|
||||||
|
. ../common_options
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
export PATH=/opt/kde3/bin:$PATH
|
||||||
|
if [ %_lib = lib64 ]; then
|
||||||
|
EXTRA_OPTIONS="--enable-libsuffix=64"
|
||||||
|
fi
|
||||||
|
%if %is_plus
|
||||||
|
EXTRA_OPTIONS="$EXTRA_OPTIONS --enable-dnotify"
|
||||||
|
%endif
|
||||||
|
export path_sudo=/usr/bin/sudo
|
||||||
|
#
|
||||||
|
# define the distribution exactly
|
||||||
|
#
|
||||||
|
test -e /.buildenv && . /.buildenv
|
||||||
|
%if %is_plus
|
||||||
|
# supplementary package
|
||||||
|
DISTRI="openSUSE $BUILD_DISTRIBUTION_VERSION UNSUPPORTED"
|
||||||
|
%else
|
||||||
|
# official build on released and maintained products
|
||||||
|
DISTRI="openSUSE $BUILD_DISTRIBUTION_VERSION"
|
||||||
|
%endif
|
||||||
|
sed 's,#define KDE_VERSION_STRING "\(.*\)",#define KDE_VERSION_STRING "\1 '"$ADD_VERSION"'",' kdecore/kdeversion.h > kdecore/kdeversion.h_ && mv kdecore/kdeversion.h_ kdecore/kdeversion.h
|
||||||
|
# find MIT kerberos
|
||||||
|
export PATH=/usr/lib/mit/bin:$PATH
|
||||||
|
# fast-malloc is not needed anymore
|
||||||
|
./configure $configkde $EXTRA_OPTIONS \
|
||||||
|
--enable-fast-malloc=no \
|
||||||
|
--with-distribution="$DISTRI"
|
||||||
|
do_make %{?jobs:-j %jobs}
|
||||||
|
#
|
||||||
|
xmlcatbin=/usr/bin/xmlcatalog
|
||||||
|
# CATALOG=docbook-simple.xml
|
||||||
|
# $xmlcatbin --noout --create $CATALOG
|
||||||
|
# $xmlcatbin --noout --add "public" \
|
||||||
|
# "-//OASIS//DTD Simplified DocBook XML V1.0//EN" \
|
||||||
|
# "file://%{xml_mod_dtd_dir}/sdocbook.dtd" $CATALOG
|
||||||
|
# $xmlcatbin --noout --add "system" \
|
||||||
|
# "http://www.oasis-open.org/docbook/xml/simple/1.0/sdocbook.dtd" \
|
||||||
|
# "file://%{xml_mod_dtd_dir}/sdocbook.dtd" $CATALOG
|
||||||
|
%define FOR_ROOT_CAT for-catalog-%{name}-%{version}.xml
|
||||||
|
CATALOG=/opt/kde3/share/apps/ksgmltools2/customization/catalog.xml
|
||||||
|
rm -f %{FOR_ROOT_CAT}.tmp
|
||||||
|
$xmlcatbin --noout --create %{FOR_ROOT_CAT}.tmp
|
||||||
|
# $xmlcatbin --noout --add "delegateSystem" \
|
||||||
|
# "http://www.oasis-open.org/docbook/xml/simple/" \
|
||||||
|
# "file:///$CATALOG" %{FOR_ROOT_CAT}.tmp
|
||||||
|
$xmlcatbin --noout --add "delegatePublic" \
|
||||||
|
"-//KDE//DTD DocBook XML V4.2" \
|
||||||
|
"file://$CATALOG" %{FOR_ROOT_CAT}.tmp
|
||||||
|
$xmlcatbin --noout --add "delegatePublic" \
|
||||||
|
"-//KDE//ELEMENTS" \
|
||||||
|
"file://$CATALOG" %{FOR_ROOT_CAT}.tmp
|
||||||
|
$xmlcatbin --noout --add "delegatePublic" \
|
||||||
|
"-//KDE//ENTITIES" \
|
||||||
|
"file://$CATALOG" %{FOR_ROOT_CAT}.tmp
|
||||||
|
# Create tag
|
||||||
|
sed '/<catalog/a\
|
||||||
|
<group id="%{name}-%{version}">
|
||||||
|
/<\/catalog/i\
|
||||||
|
</group>' \
|
||||||
|
%{FOR_ROOT_CAT}.tmp > %{FOR_ROOT_CAT}
|
||||||
|
|
||||||
|
%install
|
||||||
|
. ../common_options
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/opt/kde3/
|
||||||
|
install -m 0644 ../common_options \
|
||||||
|
$RPM_BUILD_ROOT/etc/opt/kde3/common_options
|
||||||
|
export PATH=$PWD/admin/:$PATH
|
||||||
|
do_make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/config.kcfg
|
||||||
|
install -D %SOURCE9 $RPM_BUILD_ROOT/opt/kde3/share/icons/crystalsvg/16x16/filesystems/file_broken.png
|
||||||
|
mv $RPM_BUILD_ROOT/etc/xdg/menus/applications.menu \
|
||||||
|
$RPM_BUILD_ROOT/etc/xdg/menus/applications.menu.kde
|
||||||
|
#
|
||||||
|
# lib64 compatibility symlink
|
||||||
|
#
|
||||||
|
%ifarch x86_64 ppc64 s390x mips64 sparc64
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/opt/kde3/lib/kde3/
|
||||||
|
ln -sf ../../lib64/kde3/plugins \
|
||||||
|
$RPM_BUILD_ROOT/opt/kde3/lib/kde3/plugins-lib64
|
||||||
|
%endif
|
||||||
|
#
|
||||||
|
# add missing directories
|
||||||
|
#
|
||||||
|
for i in Applications Development Editors Edutainment Games Graphics Internet Multimedia Office Settings System Toys Utilities WordProcessing; do
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT/opt/kde3/share/applnk/$i
|
||||||
|
done
|
||||||
|
rm -f locale.list
|
||||||
|
for i in $(find /usr/share/locale -mindepth 1 -maxdepth 1 -type d | sed 's:/usr/share/locale/::'); do
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/opt/kde3/share/locale/$i
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/opt/kde3/share/locale/$i/LC_MESSAGES
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/$i
|
||||||
|
echo "%lang($i) %doc /opt/kde3/share/locale/$i" >> locale.list
|
||||||
|
done
|
||||||
|
%suse_update_desktop_file kresources X-KDE-settings-desktop
|
||||||
|
# unlike with other modules, kde_post_install shouldn't
|
||||||
|
# be put at the end of %install
|
||||||
|
kde_post_install
|
||||||
|
# now create a filesystem layer
|
||||||
|
for theme in hicolor locolor; do
|
||||||
|
for j in actions apps filesystems mimetypes; do
|
||||||
|
for i in 16 22 32 48 64 128; do
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT/opt/kde3/share/icons/${theme}/${i}x${i}/${j}
|
||||||
|
done
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT/opt/kde3/share/icons/${theme}/scalable/${j}
|
||||||
|
done
|
||||||
|
done
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT/etc/opt/kde3/%_lib
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT/etc/opt/kde3/share/config
|
||||||
|
install -d -m 0755 $RPM_BUILD_ROOT/opt/kde3/share/apps/kdelibs/
|
||||||
|
install -m 0644 %SOURCE6 $RPM_BUILD_ROOT/etc/
|
||||||
|
rm -f $RPM_BUILD_ROOT/opt/kde3/%_lib/libkdeinit_*.la
|
||||||
|
#
|
||||||
|
# add additional icon path
|
||||||
|
#
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}/opt/kde3/share/apps/kdelibs
|
||||||
|
rm -f admin/*.orig
|
||||||
|
cp -a admin ${RPM_BUILD_ROOT}/opt/kde3/share/apps/kdelibs/
|
||||||
|
# This is not needed on SUSE Linux! - Marcus Meissner <meissner@suse.de>
|
||||||
|
rm $RPM_BUILD_ROOT/opt/kde3/bin/kgrantpty
|
||||||
|
#
|
||||||
|
# our version is in kdebase3
|
||||||
|
#
|
||||||
|
rm -f $RPM_BUILD_ROOT/opt/kde3/bin/fileshare*
|
||||||
|
#
|
||||||
|
# no sources for man pages
|
||||||
|
#
|
||||||
|
rm -f $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/en/kdelibs/man-*
|
||||||
|
#
|
||||||
|
# install BitTorrent icons
|
||||||
|
#
|
||||||
|
tar xfvz %SOURCE11
|
||||||
|
for i in 16x16 22x22 32x32 48x48 64x64 128x128 ; do
|
||||||
|
install -m 0644 bt/$i/mimetypes/bt.png \
|
||||||
|
$RPM_BUILD_ROOT/opt/kde3/share/icons/crystalsvg/$i/mimetypes/torrent.png
|
||||||
|
done
|
||||||
|
cp CATALOG.%{name} catalog.xml ${RPM_BUILD_ROOT}/opt/kde3/share/apps/ksgmltools2/customization/
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xml
|
||||||
|
cp %{FOR_ROOT_CAT} ${RPM_BUILD_ROOT}%{_sysconfdir}/xml
|
||||||
|
# rm -f $RPM_BUILD_ROOT/opt/kde3/%_lib/libkdefakes.la
|
||||||
|
# rm -f $RPM_BUILD_ROOT/opt/kde3/%_lib/libkjava.la
|
||||||
|
%if %suse_version > 1020
|
||||||
|
rm -f $RPM_BUILD_ROOT/opt/kde3/share/icons/hicolor/index.theme
|
||||||
|
%endif
|
||||||
|
# .desktop files in kdeaccessibility3 require the kttsd icon
|
||||||
|
for i in {16x16,22x22,32x32,48x48,64x64,128x128,scalable}; do mv $RPM_BUILD_ROOT/opt/kde3/share/icons/crystalsvg/$i/apps/kttsd.* $RPM_BUILD_ROOT/opt/kde3/share/icons/hicolor/$i/apps/;done
|
||||||
|
install -m 0644 %SOURCE14 $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/application/
|
||||||
|
install -m 0644 %SOURCE15 $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/application/
|
||||||
|
install -m 0644 %SOURCE16 $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/application/
|
||||||
|
# fix bnc#396153
|
||||||
|
for i in 16x16 22x22 32x32 48x48 64x64 128x128; do
|
||||||
|
ln -s /opt/kde3/share/icons/crystalsvg/$i/filesystems/network.png $RPM_BUILD_ROOT/opt/kde3/share/icons/crystalsvg/$i/filesystems/preferences-system-network.png
|
||||||
|
ln -s /opt/kde3/share/icons/crystalsvg/$i/filesystems/desktop.png $RPM_BUILD_ROOT/opt/kde3/share/icons/crystalsvg/$i/filesystems/preferences-desktop.png
|
||||||
|
done
|
||||||
|
chmod a-x $RPM_BUILD_ROOT/opt/kde3/share/icons/crystalsvg/16x16/filesystems/file_broken.png
|
||||||
|
%if %suse_version > 1020
|
||||||
|
%fdupes -s $RPM_BUILD_ROOT
|
||||||
|
%endif
|
||||||
|
%if %suse_version > 1110
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/opt/kde3/share/applications
|
||||||
|
touch $RPM_BUILD_ROOT/etc/opt/kde3/share/applications/mimeinfo.cache
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/applications
|
||||||
|
touch $RPM_BUILD_ROOT/opt/kde3/share/applications/mimeinfo.cache
|
||||||
|
%endif
|
||||||
|
# Create /etc/ld.so.conf.d/kdelibs3.conf
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||||
|
cat > $RPM_BUILD_ROOT/etc/ld.so.conf.d/kdelibs3.conf <<EOF
|
||||||
|
%ifarch s390x sparc64 x86_64 ppc64
|
||||||
|
/opt/kde3/lib64
|
||||||
|
%endif
|
||||||
|
/opt/kde3/lib
|
||||||
|
EOF
|
||||||
|
|
||||||
|
%post
|
||||||
|
%run_ldconfig
|
||||||
|
%run_permissions
|
||||||
|
|
||||||
|
%postun
|
||||||
|
rm -f usr/share/doc/KDE3-API/index.html
|
||||||
|
%run_ldconfig
|
||||||
|
|
||||||
|
%post arts
|
||||||
|
%run_ldconfig
|
||||||
|
|
||||||
|
%postun arts
|
||||||
|
%run_ldconfig
|
||||||
|
|
||||||
|
%post default-style
|
||||||
|
%run_ldconfig
|
||||||
|
|
||||||
|
%postun default-style
|
||||||
|
%run_ldconfig
|
||||||
|
|
||||||
|
%post doc
|
||||||
|
if [ -x %{regcat} ]; then
|
||||||
|
%{regcat} -a /opt/kde3/share/apps/ksgmltools2/customization/CATALOG.%{name} >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if [ -x /usr/bin/edit-xml-catalog ]; then
|
||||||
|
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||||
|
--add /etc/xml/%{FOR_ROOT_CAT}
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun doc
|
||||||
|
if [ "$1" = "0" -a -x %{regcat} ]; then
|
||||||
|
%{regcat} -r /opt/kde3/share/apps/ksgmltools2/customization/CATALOG.%{name} >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
# remove entries only on removal of file
|
||||||
|
if [ ! -f %{xml_sysconf_dir}/%{FOR_ROOT_CAT} -a -x /usr/bin/edit-xml-catalog ] ; then
|
||||||
|
edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
|
||||||
|
--del %{name}-%{version}
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
|
||||||
|
%files default-style
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc AUTHORS COPYING COPYING.BSD COPYING.LIB NAMING README
|
||||||
|
/opt/kde3/%_lib/libkdefx.so.*
|
||||||
|
/opt/kde3/%_lib/kde3/plugins/styles/plastik.*
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc AUTHORS COPYING COPYING.BSD COPYING.LIB NAMING README
|
||||||
|
/etc/ld.so.conf.d/kdelibs3.conf
|
||||||
|
%dir /etc/opt/kde3
|
||||||
|
%dir /opt/kde3
|
||||||
|
%dir /opt/kde3/bin
|
||||||
|
%dir /opt/kde3/include
|
||||||
|
%dir /opt/kde3/share
|
||||||
|
%dir /opt/kde3/share/config.kcfg
|
||||||
|
%_mandir/man*/*
|
||||||
|
/opt/kde3/bin/checkXML
|
||||||
|
/opt/kde3/bin/dcop
|
||||||
|
/opt/kde3/bin/dcopclient
|
||||||
|
/opt/kde3/bin/dcopfind
|
||||||
|
/opt/kde3/bin/dcopobject
|
||||||
|
/opt/kde3/bin/dcopref
|
||||||
|
/opt/kde3/bin/dcops*
|
||||||
|
/opt/kde3/bin/dcopquit
|
||||||
|
/opt/kde3/bin/imagetops
|
||||||
|
/opt/kde3/bin/ka*
|
||||||
|
/opt/kde3/bin/kbuildsycoca
|
||||||
|
/opt/kde3/bin/kco*
|
||||||
|
/opt/kde3/bin/kcmshell
|
||||||
|
/opt/kde3/bin/kded
|
||||||
|
/opt/kde3/bin/kdeinit*
|
||||||
|
/opt/kde3/bin/start_kdeinit
|
||||||
|
/opt/kde3/bin/start_kdeinit_wrapper
|
||||||
|
/opt/kde3/bin/kde-config
|
||||||
|
/opt/kde3/bin/kde-menu
|
||||||
|
/opt/kde3/bin/kdesu_stub
|
||||||
|
/opt/kde3/bin/kdontchangethehostname
|
||||||
|
/opt/kde3/bin/kfile
|
||||||
|
/opt/kde3/bin/ki*
|
||||||
|
/opt/kde3/bin/kfmexec
|
||||||
|
/opt/kde3/bin/klauncher
|
||||||
|
/opt/kde3/bin/kmailservice
|
||||||
|
/opt/kde3/bin/ktradertest
|
||||||
|
/opt/kde3/bin/knotify
|
||||||
|
/opt/kde3/bin/kstartupconfig
|
||||||
|
/opt/kde3/bin/kdostartupconfig
|
||||||
|
%verify(not mode) /opt/kde3/bin/kpac_dhcp_helper
|
||||||
|
/opt/kde3/bin/ksendbugmail
|
||||||
|
/opt/kde3/bin/kshell
|
||||||
|
/opt/kde3/bin/ktelnetservice
|
||||||
|
/opt/kde3/bin/kwrapper
|
||||||
|
/opt/kde3/bin/lnusertemp
|
||||||
|
/opt/kde3/bin/make_driver_db_lpr
|
||||||
|
/opt/kde3/bin/khotnewstuff
|
||||||
|
/opt/kde3/bin/makekdewidgets
|
||||||
|
%dir /opt/kde3/%_lib
|
||||||
|
%dir /opt/kde3/%_lib/kde3
|
||||||
|
/opt/kde3/%_lib/kde3/dcopserver.*
|
||||||
|
/opt/kde3/%_lib/kde3/kaddprinterwizard.*
|
||||||
|
/opt/kde3/%_lib/kde3/kbuildsycoca.*
|
||||||
|
/opt/kde3/%_lib/kde3/kcmshell.*
|
||||||
|
/opt/kde3/%_lib/kde3/kcm_kresources.*
|
||||||
|
/opt/kde3/%_lib/kde3/kconf_update.*
|
||||||
|
/opt/kde3/%_lib/kde3/kcookiejar.*
|
||||||
|
/opt/kde3/%_lib/kde3/kded.*
|
||||||
|
/opt/kde3/%_lib/kde3/kded_proxyscout.*
|
||||||
|
/opt/kde3/%_lib/kde3/kfileaudiopreview.*
|
||||||
|
/opt/kde3/%_lib/kde3/klauncher.*
|
||||||
|
/opt/kde3/%_lib/kde3/knotify.*
|
||||||
|
/opt/kde3/%_lib/kde3/kabc*
|
||||||
|
/opt/kde3/%_lib/kde3/kbzip2filter.*
|
||||||
|
/opt/kde3/%_lib/kde3/kded_k*
|
||||||
|
/opt/kde3/%_lib/kde3/kdeprint_ext.*
|
||||||
|
/opt/kde3/%_lib/kde3/kdeprint_lp*
|
||||||
|
/opt/kde3/%_lib/kde3/kdeprint_rlpr.*
|
||||||
|
/opt/kde3/%_lib/kde3/kdeprint_tool_escputil.*
|
||||||
|
/opt/kde3/%_lib/kde3/kgzipfilter.*
|
||||||
|
/opt/kde3/%_lib/kde3/khtmlimagepart.*
|
||||||
|
/opt/kde3/%_lib/kde3/ki*
|
||||||
|
/opt/kde3/%_lib/kde3/kjavaappletviewer.*
|
||||||
|
/opt/kde3/%_lib/kde3/ktexteditor_*
|
||||||
|
/opt/kde3/%_lib/kde3/libk*
|
||||||
|
/opt/kde3/%_lib/kde3/kspell_*
|
||||||
|
/opt/kde3/%_lib/kde3/kstyle_plastik_config.*
|
||||||
|
/opt/kde3/%_lib/kde3/kstyle_highcontrast_config.*
|
||||||
|
/opt/kde3/%_lib/kde3/libshellscript.*
|
||||||
|
%exclude /opt/kde3/%_lib/kde3/plugins/styles/plastik.*
|
||||||
|
/opt/kde3/%_lib/kde3/plugins
|
||||||
|
/opt/kde3/%_lib/libDCOP.so.*
|
||||||
|
%exclude /opt/kde3/%_lib/libkdefx.so.*
|
||||||
|
/opt/kde3/%_lib/libk*.so.*
|
||||||
|
/opt/kde3/%_lib/libvcard.so.*
|
||||||
|
/opt/kde3/%_lib/libkdeinit*.so
|
||||||
|
/opt/kde3/%_lib/libnetworkstatus.so.*
|
||||||
|
/opt/kde3/%_lib/libconnectionmanager.so.*
|
||||||
|
/opt/kde3/%_lib/kde3/kded_networkstatus.*
|
||||||
|
/opt/kde3/share/applnk
|
||||||
|
%dir /opt/kde3/share/apps
|
||||||
|
/opt/kde3/share/apps/LICENSES
|
||||||
|
/opt/kde3/share/apps/ka*
|
||||||
|
/opt/kde3/share/apps/kc*
|
||||||
|
%dir /opt/kde3/share/apps/kdeprint
|
||||||
|
/opt/kde3/share/apps/kdeprint/apsdriver*
|
||||||
|
/opt/kde3/share/apps/kdeprint/filters
|
||||||
|
/opt/kde3/share/apps/kdeprint/icons
|
||||||
|
/opt/kde3/share/apps/kdeprint/lprngtooldriver1
|
||||||
|
/opt/kde3/share/apps/kdeprint/pics
|
||||||
|
%dir /opt/kde3/share/apps/kdeprint/plugins
|
||||||
|
/opt/kde3/share/apps/kdeprint/plugins/ext.print
|
||||||
|
/opt/kde3/share/apps/kdeprint/plugins/lp*.print
|
||||||
|
/opt/kde3/share/apps/kdeprint/plugins/rlpr.print
|
||||||
|
/opt/kde3/share/apps/kdeprint/s*
|
||||||
|
/opt/kde3/share/apps/kdeprint/t*
|
||||||
|
/opt/kde3/share/apps/kdeui
|
||||||
|
/opt/kde3/share/apps/kdewidgets
|
||||||
|
/opt/kde3/share/apps/khtml
|
||||||
|
/opt/kde3/share/apps/kio_uiserver
|
||||||
|
/opt/kde3/share/apps/kjava
|
||||||
|
/opt/kde3/share/apps/knotify
|
||||||
|
/opt/kde3/share/apps/kssl
|
||||||
|
/opt/kde3/share/apps/kstyle
|
||||||
|
/opt/kde3/share/apps/ktexteditor_*
|
||||||
|
/opt/kde3/share/apps/proxyscout
|
||||||
|
/opt/kde3/share/apps/knewstuff
|
||||||
|
/opt/kde3/share/autostart
|
||||||
|
/opt/kde3/share/config
|
||||||
|
/opt/kde3/share/emoticons
|
||||||
|
/opt/kde3/share/icons
|
||||||
|
/opt/kde3/share/locale
|
||||||
|
/opt/kde3/share/mimelnk
|
||||||
|
/opt/kde3/share/service*
|
||||||
|
%config /etc/kde3rc
|
||||||
|
/opt/kde3/share/applications
|
||||||
|
/opt/kde3/bin/cupsd*
|
||||||
|
/opt/kde3/bin/make_driver_db_cups
|
||||||
|
/opt/kde3/%_lib/kde3/kdeprint_cups.*
|
||||||
|
/opt/kde3/%_lib/kde3/cupsdconf.*
|
||||||
|
/opt/kde3/share/apps/kdeprint/cups*
|
||||||
|
/opt/kde3/share/apps/kdeprint/kde_logo.png
|
||||||
|
/opt/kde3/share/apps/kdeprint/plugins/cups.print
|
||||||
|
/opt/kde3/share/apps/kdeprint/preview*
|
||||||
|
%ifarch x86_64 ppc64 s390x mips64 sparc64
|
||||||
|
%dir /opt/kde3/lib
|
||||||
|
%dir /opt/kde3/lib/kde3
|
||||||
|
/opt/kde3/lib/kde3/plugins-lib64
|
||||||
|
%endif
|
||||||
|
/etc/xdg/menus
|
||||||
|
%if %suse_version > 1110
|
||||||
|
%dir /etc/opt/kde3
|
||||||
|
%dir /etc/opt/kde3/share
|
||||||
|
%dir /etc/opt/kde3/share/applications
|
||||||
|
%ghost /etc/opt/kde3/share/applications/mimeinfo.cache
|
||||||
|
%dir /opt/kde3
|
||||||
|
%dir /opt/kde3/share
|
||||||
|
%dir /opt/kde3/share/applications
|
||||||
|
%ghost /opt/kde3/share/applications/mimeinfo.cache
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files arts
|
||||||
|
%defattr(-,root,root)
|
||||||
|
/opt/kde3/bin/artsmessage
|
||||||
|
/opt/kde3/%_lib/libartskde.so.*
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc /opt/kde3/share/doc
|
||||||
|
/opt/kde3/bin/meinproc
|
||||||
|
/opt/kde3/share/apps/ksgmltools2
|
||||||
|
%config %{_sysconfdir}/xml/%{FOR_ROOT_CAT}
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir /opt/kde3/share/apps/kdelibs
|
||||||
|
%config /etc/opt/kde3/common_options
|
||||||
|
/opt/kde3/bin/dcopidl*
|
||||||
|
/opt/kde3/bin/kmimelist
|
||||||
|
/opt/kde3/bin/preparetips
|
||||||
|
/opt/kde3/bin/ksvgtopng
|
||||||
|
/opt/kde3/bin/kunittestmodrunner
|
||||||
|
#/opt/kde3/bin/MISC
|
||||||
|
/opt/kde3/include/*
|
||||||
|
/opt/kde3/share/apps/dcopidlng
|
||||||
|
/opt/kde3/share/apps/kdelibs/admin
|
||||||
|
/opt/kde3/%_lib/libartskde.la
|
||||||
|
/opt/kde3/%_lib/libkunittest.la
|
||||||
|
/opt/kde3/%_lib/libkunittest.so
|
||||||
|
/opt/kde3/%_lib/libartskde.so
|
||||||
|
/opt/kde3/%_lib/libDCOP.so
|
||||||
|
/opt/kde3/%_lib/libvcard.so
|
||||||
|
/opt/kde3/%_lib/libvcard.la
|
||||||
|
/opt/kde3/%_lib/libDCOP.la
|
||||||
|
/opt/kde3/%_lib/lib*.a
|
||||||
|
/opt/kde3/%_lib/libkabc_dir.la
|
||||||
|
/opt/kde3/%_lib/libkabc_dir.so
|
||||||
|
/opt/kde3/%_lib/libkabc_file.la
|
||||||
|
/opt/kde3/%_lib/libkabc_file.so
|
||||||
|
/opt/kde3/%_lib/libkabc.la
|
||||||
|
/opt/kde3/%_lib/libkabc_ldapkio.la
|
||||||
|
/opt/kde3/%_lib/libkabc_ldapkio.so
|
||||||
|
/opt/kde3/%_lib/libkabc.so
|
||||||
|
/opt/kde3/%_lib/libkatepartinterfaces.la
|
||||||
|
/opt/kde3/%_lib/libkatepartinterfaces.so
|
||||||
|
/opt/kde3/%_lib/libkdecore.la
|
||||||
|
/opt/kde3/%_lib/libkdecore.so
|
||||||
|
/opt/kde3/%_lib/libkdefakes.la
|
||||||
|
/opt/kde3/%_lib/libkdefakes.so
|
||||||
|
/opt/kde3/%_lib/libkdefx.la
|
||||||
|
/opt/kde3/%_lib/libkdefx.so
|
||||||
|
/opt/kde3/%_lib/libkdemm.la
|
||||||
|
/opt/kde3/%_lib/libkdemm.so
|
||||||
|
/opt/kde3/%_lib/libkdeprint.la
|
||||||
|
/opt/kde3/%_lib/libkdeprint_management.la
|
||||||
|
/opt/kde3/%_lib/libkdeprint_management.so
|
||||||
|
/opt/kde3/%_lib/libkdeprint.so
|
||||||
|
/opt/kde3/%_lib/libkdesasl.la
|
||||||
|
/opt/kde3/%_lib/libkdesasl.so
|
||||||
|
/opt/kde3/%_lib/libkdesu.la
|
||||||
|
/opt/kde3/%_lib/libkdesu.so
|
||||||
|
/opt/kde3/%_lib/libkdeui.la
|
||||||
|
/opt/kde3/%_lib/libkdeui.so
|
||||||
|
/opt/kde3/%_lib/libkdnssd.la
|
||||||
|
/opt/kde3/%_lib/libkdnssd.so
|
||||||
|
/opt/kde3/%_lib/libkhtml.la
|
||||||
|
/opt/kde3/%_lib/libkhtml.so
|
||||||
|
/opt/kde3/%_lib/libkimproxy.la
|
||||||
|
/opt/kde3/%_lib/libkimproxy.so
|
||||||
|
/opt/kde3/%_lib/libkio.la
|
||||||
|
/opt/kde3/%_lib/libkio.so
|
||||||
|
/opt/kde3/%_lib/libkjava.la
|
||||||
|
/opt/kde3/%_lib/libkjava.so
|
||||||
|
/opt/kde3/%_lib/libkjs.la
|
||||||
|
/opt/kde3/%_lib/libkjs.so
|
||||||
|
/opt/kde3/%_lib/libkmdi2.la
|
||||||
|
/opt/kde3/%_lib/libkmdi2.so
|
||||||
|
/opt/kde3/%_lib/libkmdi.la
|
||||||
|
/opt/kde3/%_lib/libkmdi.so
|
||||||
|
/opt/kde3/%_lib/libkmediaplayer.la
|
||||||
|
/opt/kde3/%_lib/libkmediaplayer.so
|
||||||
|
/opt/kde3/%_lib/libkmid.la
|
||||||
|
/opt/kde3/%_lib/libkmid.so
|
||||||
|
/opt/kde3/%_lib/libknewstuff.la
|
||||||
|
/opt/kde3/%_lib/libknewstuff.so
|
||||||
|
/opt/kde3/%_lib/libkntlm.la
|
||||||
|
/opt/kde3/%_lib/libkntlm.so
|
||||||
|
/opt/kde3/%_lib/libkparts.la
|
||||||
|
/opt/kde3/%_lib/libkparts.so
|
||||||
|
/opt/kde3/%_lib/libkresources.la
|
||||||
|
/opt/kde3/%_lib/libkresources.so
|
||||||
|
/opt/kde3/%_lib/libkscreensaver.la
|
||||||
|
/opt/kde3/%_lib/libkscreensaver.so
|
||||||
|
/opt/kde3/%_lib/libkscript.la
|
||||||
|
/opt/kde3/%_lib/libkscript.so
|
||||||
|
/opt/kde3/%_lib/libkspell2.la
|
||||||
|
/opt/kde3/%_lib/libkspell2.so
|
||||||
|
/opt/kde3/%_lib/libkspell.la
|
||||||
|
/opt/kde3/%_lib/libkspell.so
|
||||||
|
/opt/kde3/%_lib/libktexteditor.la
|
||||||
|
/opt/kde3/%_lib/libktexteditor.so
|
||||||
|
/opt/kde3/%_lib/libkutils.la
|
||||||
|
/opt/kde3/%_lib/libkutils.so
|
||||||
|
/opt/kde3/%_lib/libkwalletbackend.la
|
||||||
|
/opt/kde3/%_lib/libkwalletbackend.so
|
||||||
|
/opt/kde3/%_lib/libkwalletclient.la
|
||||||
|
/opt/kde3/%_lib/libkwalletclient.so
|
||||||
|
/opt/kde3/%_lib/libnetworkstatus.la
|
||||||
|
/opt/kde3/%_lib/libnetworkstatus.so
|
||||||
|
/opt/kde3/%_lib/libconnectionmanager.la
|
||||||
|
/opt/kde3/%_lib/libconnectionmanager.so
|
||||||
|
|
||||||
|
%changelog
|
@ -0,0 +1,344 @@
|
|||||||
|
Index: khtml/khtmlview.h
|
||||||
|
===================================================================
|
||||||
|
--- khtml/khtmlview.h.orig
|
||||||
|
+++ khtml/khtmlview.h
|
||||||
|
@@ -314,6 +314,7 @@ private:
|
||||||
|
QStringList formCompletionItems(const QString &name) const;
|
||||||
|
void clearCompletionHistory(const QString& name);
|
||||||
|
void addFormCompletionItem(const QString &name, const QString &value);
|
||||||
|
+ void removeFormCompletionItem(const QString &name, const QString &value);
|
||||||
|
|
||||||
|
void addNonPasswordStorableSite( const QString& host );
|
||||||
|
bool nonPasswordStorableSite( const QString& host ) const;
|
||||||
|
Index: khtml/khtmlview.cpp
|
||||||
|
===================================================================
|
||||||
|
--- khtml/khtmlview.cpp.orig
|
||||||
|
+++ khtml/khtmlview.cpp
|
||||||
|
@@ -3088,6 +3088,16 @@ void KHTMLView::addFormCompletionItem(co
|
||||||
|
d->formCompletions->writeEntry(name, items);
|
||||||
|
}
|
||||||
|
|
||||||
|
+void KHTMLView::removeFormCompletionItem(const QString &name, const QString &value)
|
||||||
|
+{
|
||||||
|
+ if (!m_part->settings()->isFormCompletionEnabled())
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ QStringList items = formCompletionItems(name);
|
||||||
|
+ if (items.remove(value))
|
||||||
|
+ d->formCompletions->writeEntry(name, items);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void KHTMLView::addNonPasswordStorableSite(const QString& host)
|
||||||
|
{
|
||||||
|
if (!d->formCompletions) {
|
||||||
|
Index: khtml/rendering/render_form.h
|
||||||
|
===================================================================
|
||||||
|
--- khtml/rendering/render_form.h.orig
|
||||||
|
+++ khtml/rendering/render_form.h
|
||||||
|
@@ -272,10 +272,12 @@ private slots:
|
||||||
|
void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos);
|
||||||
|
void spellCheckerCorrected( const QString &, const QString &, unsigned int );
|
||||||
|
void spellCheckerFinished();
|
||||||
|
+ void slotRemoveFromHistory( const QString & );
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum LineEditMenuID {
|
||||||
|
- ClearHistory
|
||||||
|
+ ClearHistory,
|
||||||
|
+ EditHistory
|
||||||
|
};
|
||||||
|
DOM::HTMLInputElementImpl* m_input;
|
||||||
|
KHTMLView* m_view;
|
||||||
|
Index: khtml/rendering/render_form.cpp
|
||||||
|
===================================================================
|
||||||
|
--- khtml/rendering/render_form.cpp.orig
|
||||||
|
+++ khtml/rendering/render_form.cpp
|
||||||
|
@@ -385,7 +385,9 @@ QPopupMenu *LineEditWidget::createPopupM
|
||||||
|
|
||||||
|
if (m_input->autoComplete()) {
|
||||||
|
popup->insertSeparator();
|
||||||
|
- int id = popup->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), ClearHistory );
|
||||||
|
+ int id = popup->insertItem( SmallIconSet("edit"), i18n("&Edit History..."), EditHistory );
|
||||||
|
+ popup->setItemEnabled( id, (compObj() && !compObj()->isEmpty()) );
|
||||||
|
+ id = popup->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), ClearHistory );
|
||||||
|
popup->setItemEnabled( id, (compObj() && !compObj()->isEmpty()) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -409,11 +411,25 @@ void LineEditWidget::extendedMenuActivat
|
||||||
|
m_view->clearCompletionHistory(m_input->name().string());
|
||||||
|
if (compObj())
|
||||||
|
compObj()->clear();
|
||||||
|
+ case EditHistory:
|
||||||
|
+ {
|
||||||
|
+ KHistoryComboEditor dlg( compObj() ? compObj()->items() : QStringList(), this );
|
||||||
|
+ connect( &dlg, SIGNAL( removeFromHistory(const QString&) ), SLOT( slotRemoveFromHistory(const QString&)) );
|
||||||
|
+ dlg.exec();
|
||||||
|
+ }
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+void LineEditWidget::slotRemoveFromHistory(const QString &entry)
|
||||||
|
+{
|
||||||
|
+ m_view->removeFormCompletionItem(m_input->name().string(), entry);
|
||||||
|
+ if (compObj())
|
||||||
|
+ compObj()->removeItem(entry);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
bool LineEditWidget::event( QEvent *e )
|
||||||
|
{
|
||||||
|
if (KLineEdit::event(e))
|
||||||
|
Index: kdeui/kcombobox.h
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kcombobox.h.orig
|
||||||
|
+++ kdeui/kcombobox.h
|
||||||
|
@@ -24,8 +24,15 @@
|
||||||
|
|
||||||
|
#include <qlineedit.h>
|
||||||
|
#include <qcombobox.h>
|
||||||
|
+#include <qvbox.h>
|
||||||
|
+#include <qlabel.h>
|
||||||
|
+#include <qlayout.h>
|
||||||
|
+#include <qtoolbutton.h>
|
||||||
|
+#include <qheader.h>
|
||||||
|
|
||||||
|
#include <kcompletion.h>
|
||||||
|
+#include <kdialogbase.h>
|
||||||
|
+#include <klistview.h>
|
||||||
|
|
||||||
|
class QListBoxItem;
|
||||||
|
class QPopupMenu;
|
||||||
|
@@ -669,6 +676,12 @@ public:
|
||||||
|
*/
|
||||||
|
void reset() { slotReset(); }
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * When enabling it you have to connect to "removed" signal and save changes
|
||||||
|
+ */
|
||||||
|
+ void setHistoryEditorEnabled( bool enable );
|
||||||
|
+ bool isHistoryEditorEnabled() const;
|
||||||
|
+
|
||||||
|
public slots:
|
||||||
|
/**
|
||||||
|
* Adds an item to the end of the history list and to the completion list.
|
||||||
|
@@ -702,6 +715,8 @@ signals:
|
||||||
|
*/
|
||||||
|
void cleared();
|
||||||
|
|
||||||
|
+ void removed( const QString& item );
|
||||||
|
+
|
||||||
|
protected:
|
||||||
|
/**
|
||||||
|
* Handling key-events, the shortcuts to rotate the items.
|
||||||
|
@@ -741,10 +756,17 @@ private slots:
|
||||||
|
void slotClear();
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * Called from the popupmenu,
|
||||||
|
+ */
|
||||||
|
+ void slotEdit();
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
* Appends our own context menu entry.
|
||||||
|
*/
|
||||||
|
void addContextMenuItems( QPopupMenu* );
|
||||||
|
|
||||||
|
+ void slotRemoveFromHistory( const QString & );
|
||||||
|
+
|
||||||
|
private:
|
||||||
|
void init( bool useCompletion );
|
||||||
|
void rotateUp();
|
||||||
|
@@ -774,6 +796,30 @@ private:
|
||||||
|
KHistoryComboPrivate* const d;
|
||||||
|
};
|
||||||
|
|
||||||
|
+class KDEUI_EXPORT KHistoryComboEditor : public KDialogBase
|
||||||
|
+{
|
||||||
|
+ Q_OBJECT
|
||||||
|
+
|
||||||
|
+public:
|
||||||
|
+ KHistoryComboEditor( const QStringList& entries, QWidget *parent = 0L );
|
||||||
|
+ ~KHistoryComboEditor();
|
||||||
|
+
|
||||||
|
+signals:
|
||||||
|
+ void removeFromHistory( const QString& );
|
||||||
|
+
|
||||||
|
+protected slots:
|
||||||
|
+ virtual void slotUser1(); // User1 is "Delete Entry" button
|
||||||
|
+ void slotSelectionChanged( QListViewItem * item );
|
||||||
|
+
|
||||||
|
+protected:
|
||||||
|
+ virtual void virtual_hook( int id, void* data );
|
||||||
|
+
|
||||||
|
+private:
|
||||||
|
+ KListView *m_pListView;
|
||||||
|
+
|
||||||
|
+ class KHistoryComboEditorPrivate;
|
||||||
|
+ KHistoryComboEditorPrivate* const d;
|
||||||
|
+};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Index: kdeui/kcombobox.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdeui/kcombobox.cpp.orig
|
||||||
|
+++ kdeui/kcombobox.cpp
|
||||||
|
@@ -29,6 +29,7 @@
|
||||||
|
#include <kcursor.h>
|
||||||
|
#include <kiconloader.h>
|
||||||
|
#include <kicontheme.h>
|
||||||
|
+#include <klistviewsearchline.h>
|
||||||
|
#include <klineedit.h>
|
||||||
|
#include <klocale.h>
|
||||||
|
#include <knotifyclient.h>
|
||||||
|
@@ -343,10 +344,22 @@ void KComboBox::lineEditDeleted()
|
||||||
|
// *********************************************************************
|
||||||
|
// *********************************************************************
|
||||||
|
|
||||||
|
+class KHistoryCombo::KHistoryComboPrivate
|
||||||
|
+{
|
||||||
|
+public:
|
||||||
|
+ KHistoryComboPrivate() : bHistoryEditorEnabled(false)
|
||||||
|
+ {
|
||||||
|
+ }
|
||||||
|
+ ~KHistoryComboPrivate()
|
||||||
|
+ {
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ bool bHistoryEditorEnabled;
|
||||||
|
+};
|
||||||
|
|
||||||
|
// we are always read-write
|
||||||
|
KHistoryCombo::KHistoryCombo( QWidget *parent, const char *name )
|
||||||
|
- : KComboBox( true, parent, name ), d(0)
|
||||||
|
+ : KComboBox( true, parent, name ), d(new KHistoryComboPrivate)
|
||||||
|
{
|
||||||
|
init( true ); // using completion
|
||||||
|
}
|
||||||
|
@@ -354,7 +367,7 @@ KHistoryCombo::KHistoryCombo( QWidget *p
|
||||||
|
// we are always read-write
|
||||||
|
KHistoryCombo::KHistoryCombo( bool useCompletion,
|
||||||
|
QWidget *parent, const char *name )
|
||||||
|
- : KComboBox( true, parent, name ), d(0)
|
||||||
|
+ : KComboBox( true, parent, name ), d(new KHistoryComboPrivate)
|
||||||
|
{
|
||||||
|
init( useCompletion );
|
||||||
|
}
|
||||||
|
@@ -441,6 +454,10 @@ void KHistoryCombo::addContextMenuItems(
|
||||||
|
if ( menu )
|
||||||
|
{
|
||||||
|
menu->insertSeparator();
|
||||||
|
+ if (d->bHistoryEditorEnabled) {
|
||||||
|
+ int idedit = menu->insertItem( SmallIconSet("edit"), i18n("&Edit History..."), this, SLOT( slotEdit()) );
|
||||||
|
+ menu->setItemEnabled(idedit, count());
|
||||||
|
+ }
|
||||||
|
int id = menu->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), this, SLOT( slotClear()));
|
||||||
|
if (!count())
|
||||||
|
menu->setItemEnabled(id, false);
|
||||||
|
@@ -677,10 +694,104 @@ void KHistoryCombo::slotClear()
|
||||||
|
emit cleared();
|
||||||
|
}
|
||||||
|
|
||||||
|
+void KHistoryCombo::slotEdit()
|
||||||
|
+{
|
||||||
|
+ KHistoryComboEditor dlg( historyItems(), this );
|
||||||
|
+ connect( &dlg, SIGNAL( removeFromHistory(const QString&) ), SLOT( slotRemoveFromHistory(const QString&)) );
|
||||||
|
+ dlg.exec();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void KHistoryCombo::slotRemoveFromHistory(const QString &entry)
|
||||||
|
+{
|
||||||
|
+ removeFromHistory(entry);
|
||||||
|
+ emit removed(entry);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void KHistoryCombo::setHistoryEditorEnabled( bool enable )
|
||||||
|
+{
|
||||||
|
+ d->bHistoryEditorEnabled = enable;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool KHistoryCombo::isHistoryEditorEnabled() const
|
||||||
|
+{
|
||||||
|
+ return d->bHistoryEditorEnabled;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void KComboBox::virtual_hook( int id, void* data )
|
||||||
|
{ KCompletionBase::virtual_hook( id, data ); }
|
||||||
|
|
||||||
|
void KHistoryCombo::virtual_hook( int id, void* data )
|
||||||
|
{ KComboBox::virtual_hook( id, data ); }
|
||||||
|
|
||||||
|
+void KHistoryComboEditor::virtual_hook( int id, void* data )
|
||||||
|
+{ KDialogBase::virtual_hook( id, data ); }
|
||||||
|
+
|
||||||
|
+KHistoryComboEditor::KHistoryComboEditor( const QStringList& entries, QWidget *parent )
|
||||||
|
+: KDialogBase( parent, "khistorycomboeditor", true, i18n( "History Editor" ),
|
||||||
|
+ KDialogBase::Close | KDialogBase::User1, KDialogBase::User1, true,
|
||||||
|
+ KGuiItem( i18n( "&Delete Entry" ), "editdelete") ), d(0)
|
||||||
|
+{
|
||||||
|
+ QVBox* box = new QVBox( this );
|
||||||
|
+ box->setSpacing( KDialog::spacingHint() );
|
||||||
|
+ setMainWidget( box );
|
||||||
|
+
|
||||||
|
+ new QLabel( i18n( "This dialog allows you to delete unwanted history items." ), box );
|
||||||
|
+
|
||||||
|
+ // Add searchline
|
||||||
|
+ QHBox* searchbox = new QHBox( box );
|
||||||
|
+ searchbox->setSpacing( KDialog::spacingHint() );
|
||||||
|
+
|
||||||
|
+ QToolButton *clearSearch = new QToolButton(searchbox);
|
||||||
|
+ clearSearch->setTextLabel(i18n("Clear Search"), true);
|
||||||
|
+ clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
|
||||||
|
+ QLabel* slbl = new QLabel(i18n("&Search:"), searchbox);
|
||||||
|
+ KListViewSearchLine* listViewSearch = new KListViewSearchLine(searchbox);
|
||||||
|
+ slbl->setBuddy(listViewSearch);
|
||||||
|
+ connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear()));
|
||||||
|
+
|
||||||
|
+ // Add ListView
|
||||||
|
+ m_pListView = new KListView( box );
|
||||||
|
+ listViewSearch->setListView(m_pListView);
|
||||||
|
+ m_pListView->setAllColumnsShowFocus(true);
|
||||||
|
+ m_pListView->header()->hide();
|
||||||
|
+ m_pListView->addColumn("");
|
||||||
|
+ m_pListView->setRenameable( 0 );
|
||||||
|
+
|
||||||
|
+ box->setStretchFactor( m_pListView, 1 );
|
||||||
|
+
|
||||||
|
+ QStringList newlist = entries;
|
||||||
|
+ for ( QStringList::Iterator it = newlist.begin(); it != newlist.end(); ++it ) {
|
||||||
|
+ new QListViewItem( m_pListView, *it );
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ m_pListView->setMinimumSize( m_pListView->sizeHint() );
|
||||||
|
+
|
||||||
|
+ connect( m_pListView, SIGNAL( selectionChanged( QListViewItem * ) ),
|
||||||
|
+ this, SLOT( slotSelectionChanged( QListViewItem * ) ) );
|
||||||
|
+
|
||||||
|
+ enableButton( KDialogBase::User1, false );
|
||||||
|
+
|
||||||
|
+ resize( sizeHint() );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+KHistoryComboEditor::~KHistoryComboEditor()
|
||||||
|
+{
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void KHistoryComboEditor::slotUser1() // Delete button
|
||||||
|
+{
|
||||||
|
+ QListViewItem *item = m_pListView->selectedItem();
|
||||||
|
+
|
||||||
|
+ if ( item ) {
|
||||||
|
+ emit removeFromHistory( item->text(0) );
|
||||||
|
+ m_pListView->takeItem( item );
|
||||||
|
+ enableButton( KDialogBase::User1, false );
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void KHistoryComboEditor::slotSelectionChanged( QListViewItem * item )
|
||||||
|
+{
|
||||||
|
+ enableButton( KDialogBase::User1, item );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#include "kcombobox.moc"
|
@ -0,0 +1,44 @@
|
|||||||
|
Index: kioslave/file/file.cc
|
||||||
|
===================================================================
|
||||||
|
--- kioslave/file/file.cc.orig
|
||||||
|
+++ kioslave/file/file.cc
|
||||||
|
@@ -69,6 +69,7 @@
|
||||||
|
#include <qvaluelist.h>
|
||||||
|
#include <qregexp.h>
|
||||||
|
|
||||||
|
+#include <dcopref.h>
|
||||||
|
#include <kshred.h>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kurl.h>
|
||||||
|
@@ -1609,6 +1610,31 @@ void FileProtocol::unmount( const QStrin
|
||||||
|
#endif /* HAVE_VOLMGT */
|
||||||
|
|
||||||
|
err = testLogFile( tmp );
|
||||||
|
+
|
||||||
|
+ if (err.contains("fstab") || err.contains("root")) {
|
||||||
|
+ QString olderr;
|
||||||
|
+ err = QString::null;
|
||||||
|
+
|
||||||
|
+ DCOPRef d("kded", "mediamanager");
|
||||||
|
+ d.setDCOPClient ( dcopClient() );
|
||||||
|
+ DCOPReply reply = d.call("properties", _point);
|
||||||
|
+ QString udi;
|
||||||
|
+
|
||||||
|
+ if ( reply.isValid() ) {
|
||||||
|
+ QStringList list = reply;
|
||||||
|
+ if (list.size())
|
||||||
|
+ udi = list[0];
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!udi.isEmpty())
|
||||||
|
+ reply = d.call("unmount", udi);
|
||||||
|
+
|
||||||
|
+ if (udi.isEmpty() || !reply.isValid())
|
||||||
|
+ err = olderr;
|
||||||
|
+ else if (reply.isValid())
|
||||||
|
+ reply.get(err);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if ( err.isEmpty() )
|
||||||
|
finished();
|
||||||
|
else
|
@ -0,0 +1,240 @@
|
|||||||
|
Index: kinit/wrapper.c
|
||||||
|
===================================================================
|
||||||
|
--- kinit/wrapper.c.orig
|
||||||
|
+++ kinit/wrapper.c
|
||||||
|
@@ -164,7 +164,9 @@ static int openSocket()
|
||||||
|
sock_file[strlen(sock_file)-1] = 0;
|
||||||
|
|
||||||
|
strncat(sock_file, "/socket-", MAX_SOCK_FILE - strlen(sock_file));
|
||||||
|
- if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
|
||||||
|
+ if( getenv("XAUTHLOCALHOSTNAME"))
|
||||||
|
+ strncat(sock_file, getenv("XAUTHLOCALHOSTNAME"), MAX_SOCK_FILE - strlen(sock_file) - 1);
|
||||||
|
+ else if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
|
||||||
|
{
|
||||||
|
perror("Warning: Could not determine hostname: ");
|
||||||
|
return -1;
|
||||||
|
Index: kinit/lnusertemp.c
|
||||||
|
===================================================================
|
||||||
|
--- kinit/lnusertemp.c.orig
|
||||||
|
+++ kinit/lnusertemp.c
|
||||||
|
@@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
int check_tmp_dir(const char *tmp_dir);
|
||||||
|
int create_link(const char *file, const char *tmp_dir);
|
||||||
|
-int build_link(const char *tmp_prefix, const char *kde_prefix);
|
||||||
|
+int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname);
|
||||||
|
|
||||||
|
int check_tmp_dir(const char *tmp_dir)
|
||||||
|
{
|
||||||
|
@@ -89,7 +89,7 @@ int create_link(const char *file, const
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-int build_link(const char *tmp_prefix, const char *kde_prefix)
|
||||||
|
+int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
|
||||||
|
{
|
||||||
|
struct passwd *pw_ent;
|
||||||
|
char kde_tmp_dir[PATH_MAX+1];
|
||||||
|
@@ -157,10 +157,21 @@ int build_link(const char *tmp_prefix, c
|
||||||
|
}
|
||||||
|
|
||||||
|
strncat(kde_tmp_dir, kde_prefix, PATH_MAX - strlen(kde_tmp_dir));
|
||||||
|
- if (gethostname(kde_tmp_dir+strlen(kde_tmp_dir), PATH_MAX - strlen(kde_tmp_dir) - 1) != 0)
|
||||||
|
+
|
||||||
|
+ if( kdehostname )
|
||||||
|
+ {
|
||||||
|
+ if( getenv("XAUTHLOCALHOSTNAME"))
|
||||||
|
+ strncat(kde_tmp_dir+strlen(kde_tmp_dir), getenv("XAUTHLOCALHOSTNAME"), PATH_MAX - strlen(kde_tmp_dir) - 1);
|
||||||
|
+ else
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
{
|
||||||
|
- perror("Aborting. Could not determine hostname: ");
|
||||||
|
- exit(255);
|
||||||
|
+ if (gethostname(kde_tmp_dir+strlen(kde_tmp_dir), PATH_MAX - strlen(kde_tmp_dir) - 1) != 0)
|
||||||
|
+ {
|
||||||
|
+ perror("Could not determine hostname: ");
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
kde_tmp_dir[sizeof(kde_tmp_dir)-1] = '\0';
|
||||||
|
|
||||||
|
@@ -266,7 +277,9 @@ int main(int argc, char **argv)
|
||||||
|
kde_prefix = "/cache-";
|
||||||
|
}
|
||||||
|
|
||||||
|
- res = build_link(tmp_prefix, kde_prefix);
|
||||||
|
+ res = build_link(tmp_prefix, kde_prefix, 1);
|
||||||
|
+ if( build_link(tmp_prefix, kde_prefix, 0))
|
||||||
|
+ res = 1;
|
||||||
|
|
||||||
|
free(tmp_prefix);
|
||||||
|
|
||||||
|
Index: kdecore/kstandarddirs.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kstandarddirs.cpp.orig
|
||||||
|
+++ kdecore/kstandarddirs.cpp
|
||||||
|
@@ -719,7 +719,10 @@ void KStandardDirs::createSpecialResourc
|
||||||
|
{
|
||||||
|
char hostname[256];
|
||||||
|
hostname[0] = 0;
|
||||||
|
- gethostname(hostname, 255);
|
||||||
|
+ if( getenv("XAUTHLOCALHOSTNAME"))
|
||||||
|
+ strlcpy(hostname, getenv("XAUTHLOCALHOSTNAME"), 255 );
|
||||||
|
+ else
|
||||||
|
+ gethostname(hostname, 255);
|
||||||
|
QString dir = QString("%1%2-%3").arg(localkdedir()).arg(type).arg(hostname);
|
||||||
|
char link[1024];
|
||||||
|
link[1023] = 0;
|
||||||
|
Index: kdecore/kcrash.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kcrash.cpp.orig
|
||||||
|
+++ kdecore/kcrash.cpp
|
||||||
|
@@ -466,7 +466,9 @@ static int openSocket()
|
||||||
|
sock_file[strlen(sock_file)-1] = 0;
|
||||||
|
|
||||||
|
strncat(sock_file, "/socket-", MAX_SOCK_FILE - strlen(sock_file));
|
||||||
|
- if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
|
||||||
|
+ if( getenv("XAUTHLOCALHOSTNAME"))
|
||||||
|
+ strncat(sock_file, getenv("XAUTHLOCALHOSTNAME"), MAX_SOCK_FILE - strlen(sock_file) - 1);
|
||||||
|
+ else if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
|
||||||
|
{
|
||||||
|
perror("Warning: Could not determine hostname: ");
|
||||||
|
return -1;
|
||||||
|
Index: dcop/dcopserver_shutdown.c
|
||||||
|
===================================================================
|
||||||
|
--- dcop/dcopserver_shutdown.c.orig
|
||||||
|
+++ dcop/dcopserver_shutdown.c
|
||||||
|
@@ -95,7 +95,9 @@ static void getDCOPFile(char *dcop_file,
|
||||||
|
strncat(dcop_file, "/.DCOPserver_", n);
|
||||||
|
n -= strlen("/.DCOPserver_");
|
||||||
|
|
||||||
|
- if (gethostname(dcop_file+strlen(dcop_file), n) != 0)
|
||||||
|
+ if (getenv("XAUTHLOCALHOSTNAME"))
|
||||||
|
+ strncat(dcop_file+strlen(dcop_file), getenv("XAUTHLOCALHOSTNAME"), n);
|
||||||
|
+ else if (gethostname(dcop_file+strlen(dcop_file), n) != 0)
|
||||||
|
{
|
||||||
|
perror("Error. Could not determine hostname: ");
|
||||||
|
dcop_file[0] = '\0';
|
||||||
|
Index: dcop/dcopc.c
|
||||||
|
===================================================================
|
||||||
|
--- dcop/dcopc.c.orig
|
||||||
|
+++ dcop/dcopc.c
|
||||||
|
@@ -684,7 +684,9 @@ dcop_connect()
|
||||||
|
}
|
||||||
|
|
||||||
|
hostName[0] = '\0';
|
||||||
|
- if (gethostname(hostName, sizeof(hostName)))
|
||||||
|
+ if (getenv("XAUTHLOCALHOSTNAME"))
|
||||||
|
+ strlcpy(hostName, getenv("XAUTHLOCALHOSTNAME"),sizeof(hostName)-1);
|
||||||
|
+ else if (gethostname(hostName, sizeof(hostName)))
|
||||||
|
strcpy(hostName, "localhost");
|
||||||
|
else
|
||||||
|
hostName[sizeof(hostName)-1] = '\0';
|
||||||
|
Index: dcop/dcopclient.cpp
|
||||||
|
===================================================================
|
||||||
|
--- dcop/dcopclient.cpp.orig
|
||||||
|
+++ dcop/dcopclient.cpp
|
||||||
|
@@ -277,7 +277,9 @@ static QCString dcopServerFile(const QCS
|
||||||
|
{
|
||||||
|
char hostName[256];
|
||||||
|
hostName[0] = '\0';
|
||||||
|
- if (gethostname(hostName, sizeof(hostName)))
|
||||||
|
+ if (getenv("XAUTHLOCALHOSTNAME"))
|
||||||
|
+ fName += getenv("XAUTHLOCALHOSTNAME");
|
||||||
|
+ else if (gethostname(hostName, sizeof(hostName)))
|
||||||
|
{
|
||||||
|
fName += "localhost";
|
||||||
|
}
|
||||||
|
Index: dcop/KDE-ICE/Xtranssock.c
|
||||||
|
===================================================================
|
||||||
|
--- dcop/KDE-ICE/Xtranssock.c.orig
|
||||||
|
+++ dcop/KDE-ICE/Xtranssock.c
|
||||||
|
@@ -1444,6 +1444,7 @@ UnixHostReallyLocal (char *host)
|
||||||
|
|
||||||
|
{
|
||||||
|
char hostnamebuf[256];
|
||||||
|
+ char* xauthlocalname = getenv("XAUTHLOCALHOSTNAME");
|
||||||
|
|
||||||
|
TRANS(GetHostname) (hostnamebuf, sizeof (hostnamebuf));
|
||||||
|
|
||||||
|
@@ -1451,6 +1452,10 @@ UnixHostReallyLocal (char *host)
|
||||||
|
{
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
+ else if(xauthlocalname && strcmp (xauthlocalname, host) == 0)
|
||||||
|
+ {
|
||||||
|
+ return (1);
|
||||||
|
+ }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Index: kded/khostname.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kded/khostname.cpp.orig
|
||||||
|
+++ kded/khostname.cpp
|
||||||
|
@@ -111,7 +111,8 @@ static QCStringList split(const QCString
|
||||||
|
|
||||||
|
void KHostName::changeX()
|
||||||
|
{
|
||||||
|
- QString cmd = "xauth list";
|
||||||
|
+ const char* xauthlocalhostname = getenv("XAUTHLOCALHOSTNAME");
|
||||||
|
+ QString cmd = "xauth -n list";
|
||||||
|
FILE *xFile = popen(QFile::encodeName(cmd), "r");
|
||||||
|
if (!xFile)
|
||||||
|
{
|
||||||
|
@@ -123,6 +124,7 @@ void KHostName::changeX()
|
||||||
|
char buf[1024+1];
|
||||||
|
while (!feof(xFile))
|
||||||
|
{
|
||||||
|
+ buf[1024]='\0';
|
||||||
|
QCString line = fgets(buf, 1024, xFile);
|
||||||
|
if (line.length())
|
||||||
|
line.truncate(line.length()-1); // Strip LF.
|
||||||
|
@@ -157,12 +159,17 @@ void KHostName::changeX()
|
||||||
|
QCString newNetId = newName+netId.mid(i);
|
||||||
|
QCString oldNetId = netId.left(i);
|
||||||
|
|
||||||
|
- if(oldNetId != oldName)
|
||||||
|
- continue;
|
||||||
|
+ if(oldNetId != oldName
|
||||||
|
+ && (!xauthlocalhostname || strcmp(xauthlocalhostname, oldNetId.data()) != 0))
|
||||||
|
+ continue;
|
||||||
|
|
||||||
|
- cmd = "xauth remove "+KProcess::quote(netId);
|
||||||
|
- system(QFile::encodeName(cmd));
|
||||||
|
- cmd = "xauth add ";
|
||||||
|
+ // don't nuke the xauth when XAUTHLOCALHOSTNAME points to it
|
||||||
|
+ if (!xauthlocalhostname || oldNetId != xauthlocalhostname)
|
||||||
|
+ {
|
||||||
|
+ cmd = "xauth -n remove "+KProcess::quote(netId);
|
||||||
|
+ system(QFile::encodeName(cmd));
|
||||||
|
+ }
|
||||||
|
+ cmd = "xauth -n add ";
|
||||||
|
cmd += KProcess::quote(newNetId);
|
||||||
|
cmd += " ";
|
||||||
|
cmd += KProcess::quote(authName);
|
||||||
|
@@ -276,7 +283,10 @@ void KHostName::changeDcop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- // Remove old entries
|
||||||
|
+ // Remove old entries, but only if XAUTHLOCALHOSTNAME doesn't point
|
||||||
|
+ // to it
|
||||||
|
+ char* xauthlocalhostname = getenv("XAUTHLOCALHOSTNAME");
|
||||||
|
+ if (!xauthlocalhostname || !oldNetId.contains(xauthlocalhostname))
|
||||||
|
{
|
||||||
|
QString cmd = "iceauth remove "+KProcess::quote("netid="+oldNetId);
|
||||||
|
system(QFile::encodeName(cmd));
|
||||||
|
@@ -368,9 +378,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
|
KHostName hn;
|
||||||
|
|
||||||
|
- if(!getenv("XAUTHLOCALHOSTNAME"))
|
||||||
|
- hn.changeX();
|
||||||
|
-
|
||||||
|
+ hn.changeX();
|
||||||
|
hn.changeDcop();
|
||||||
|
hn.changeStdDirs("socket");
|
||||||
|
hn.changeStdDirs("tmp");
|
@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Type=MimeType
|
||||||
|
MimeType=application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||||
|
Patterns=*.pptx;*.PPTX
|
||||||
|
Icon=presentation
|
||||||
|
Comment=Open XML Presentation Document
|
||||||
|
[Property::X-KDE-NativeExtension]
|
||||||
|
Type=QString
|
||||||
|
Value=.pptx
|
@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Type=MimeType
|
||||||
|
MimeType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||||
|
Patterns=*.xlsx;*.XLSX
|
||||||
|
Icon=spreadsheet
|
||||||
|
Comment=Open XML Spreadsheet Document
|
||||||
|
[Property::X-KDE-NativeExtension]
|
||||||
|
Type=QString
|
||||||
|
Value=.xlsx
|
@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Type=MimeType
|
||||||
|
MimeType=application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||||
|
Patterns=*.docx;*.DOCX
|
||||||
|
Icon=wordprocessing
|
||||||
|
Comment=Open XML Word Processing Document
|
||||||
|
[Property::X-KDE-NativeExtension]
|
||||||
|
Type=QString
|
||||||
|
Value=.docx
|
@ -0,0 +1,10 @@
|
|||||||
|
Index: mimetypes/application/x-jar.desktop
|
||||||
|
===================================================================
|
||||||
|
--- mimetypes/application/x-jar.desktop.orig
|
||||||
|
+++ mimetypes/application/x-jar.desktop
|
||||||
|
@@ -87,4 +87,4 @@ Comment[zh_CN]=Java 归档
|
||||||
|
Comment[zh_HK]=Java 壓縮檔
|
||||||
|
Comment[zh_TW]=Java 壓縮檔案
|
||||||
|
Comment[zu]=Umqulu we-Java
|
||||||
|
-X-KDE-AutoEmbed=true
|
||||||
|
+X-KDE-AutoEmbed=false
|
@ -0,0 +1,16 @@
|
|||||||
|
Index: kio/kio/kservice.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/kservice.cpp.orig
|
||||||
|
+++ kio/kio/kservice.cpp
|
||||||
|
@@ -249,7 +249,10 @@ KService::init( KDesktopFile *config )
|
||||||
|
m_bAllowAsDefault = config->readBoolEntry( "AllowDefault", true );
|
||||||
|
entryMap.remove("AllowDefault");
|
||||||
|
|
||||||
|
- m_initialPreference = config->readNumEntry( "InitialPreference", 1 );
|
||||||
|
+ m_initialPreference = config->readNumEntry( "X-KDE-InitialPreference", 1 );
|
||||||
|
+ entryMap.remove("X-KDE-InitialPreference");
|
||||||
|
+ if ( m_initialPreference == 1 )
|
||||||
|
+ m_initialPreference = config->readNumEntry( "InitialPreference", 1 );
|
||||||
|
entryMap.remove("InitialPreference");
|
||||||
|
|
||||||
|
// Store all additional entries in the property map.
|
@ -0,0 +1,543 @@
|
|||||||
|
Index: kio/kio/krun.h
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/krun.h.orig
|
||||||
|
+++ kio/kio/krun.h
|
||||||
|
@@ -111,6 +111,8 @@ public:
|
||||||
|
*/
|
||||||
|
KRun( const KURL& url, QWidget* window, mode_t mode = 0,
|
||||||
|
bool isLocalFile = false, bool showProgressInfo = true );
|
||||||
|
+ KRun( const KURL& url, QWidget* window, const QCString& asn, mode_t mode = 0,
|
||||||
|
+ bool isLocalFile = false, bool showProgressInfo = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor. Don't call it yourself, since a KRun object auto-deletes
|
||||||
|
@@ -210,6 +212,8 @@ public:
|
||||||
|
* @since 3.5.2
|
||||||
|
*/
|
||||||
|
static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles = false );
|
||||||
|
+ static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window,
|
||||||
|
+ const QCString& asn, bool tempFiles = false );
|
||||||
|
/**
|
||||||
|
* Open a list of URLs with a certain service (application).
|
||||||
|
*
|
||||||
|
@@ -226,6 +230,8 @@ public:
|
||||||
|
/// @since 3.5.3
|
||||||
|
/// @internal
|
||||||
|
static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles, const QString& suggestedFileName );
|
||||||
|
+ static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window,
|
||||||
|
+ const QCString& asn, bool tempFiles, const QString& suggestedFileName );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a list of URLs with.
|
||||||
|
@@ -269,6 +275,7 @@ public:
|
||||||
|
static pid_t runURL( const KURL& _url, const QString& _mimetype );
|
||||||
|
/// @since 3.5.3
|
||||||
|
/// @internal
|
||||||
|
+ static pid_t runURL( const KURL& _url, const QString& _mimetype, QWidget* window, const QCString& asn, bool tempFile, bool runExecutables, const QString& suggestedFileName );
|
||||||
|
static pid_t runURL( const KURL& _url, const QString& _mimetype, bool tempFile, bool runExecutables, const QString& suggestedFileName );
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -299,6 +306,8 @@ public:
|
||||||
|
* of running command) if command was unsafe for map notification.
|
||||||
|
*/
|
||||||
|
static pid_t runCommand( const QString& cmd, const QString & execName, const QString & icon );
|
||||||
|
+ static pid_t runCommand( const QString& cmd, const QString & execName, const QString & icon,
|
||||||
|
+ QWidget* window, const QCString& asn );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the Open-With dialog for those URLs, and run the chosen application.
|
||||||
|
@@ -438,7 +447,7 @@ protected:
|
||||||
|
virtual void virtual_hook( int id, void* data );
|
||||||
|
|
||||||
|
private:
|
||||||
|
- void init (const KURL& url, QWidget* window, mode_t mode,
|
||||||
|
+ void init (const KURL& url, QWidget* window, const QCString& asn, mode_t mode,
|
||||||
|
bool isLocalFile, bool showProgressInfo);
|
||||||
|
private:
|
||||||
|
class KRunPrivate;
|
||||||
|
Index: kio/kio/krun.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kio/kio/krun.cpp.orig
|
||||||
|
+++ kio/kio/krun.cpp
|
||||||
|
@@ -77,6 +77,7 @@ public:
|
||||||
|
QString m_localPath;
|
||||||
|
QString m_suggestedFileName;
|
||||||
|
QGuardedPtr <QWidget> m_window;
|
||||||
|
+ QCString m_asn;
|
||||||
|
};
|
||||||
|
|
||||||
|
pid_t KRun::runURL( const KURL& u, const QString& _mimetype )
|
||||||
|
@@ -109,14 +110,20 @@ bool KRun::isExecutableFile( const KURL&
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
-// This is called by foundMimeType, since it knows the mimetype of the URL
|
||||||
|
pid_t KRun::runURL( const KURL& u, const QString& _mimetype, bool tempFile, bool runExecutables, const QString& suggestedFileName )
|
||||||
|
{
|
||||||
|
+ return runURL( u, _mimetype, NULL, "", tempFile, runExecutables, suggestedFileName );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+// This is called by foundMimeType, since it knows the mimetype of the URL
|
||||||
|
+pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, const QCString& asn,
|
||||||
|
+ bool tempFile, bool runExecutables, const QString& suggestedFileName )
|
||||||
|
+{
|
||||||
|
bool noRun = false;
|
||||||
|
bool noAuth = false;
|
||||||
|
if ( _mimetype == "inode/directory-locked" )
|
||||||
|
{
|
||||||
|
- KMessageBoxWrapper::error( 0L,
|
||||||
|
+ KMessageBoxWrapper::error( window,
|
||||||
|
i18n("<qt>Unable to enter <b>%1</b>.\nYou do not have access rights to this location.</qt>").arg(u.htmlURL()) );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -133,7 +140,7 @@ pid_t KRun::runURL( const KURL& u, const
|
||||||
|
{
|
||||||
|
QString path = u.path();
|
||||||
|
shellQuote( path );
|
||||||
|
- return (KRun::runCommand(path)); // just execute the url as a command
|
||||||
|
+ return (KRun::runCommand(path, QString::null, QString::null, window, asn)); // just execute the url as a command
|
||||||
|
// ## TODO implement deleting the file if tempFile==true
|
||||||
|
}
|
||||||
|
else
|
||||||
|
@@ -155,14 +162,14 @@ pid_t KRun::runURL( const KURL& u, const
|
||||||
|
|
||||||
|
if ( noRun )
|
||||||
|
{
|
||||||
|
- KMessageBox::sorry( 0L,
|
||||||
|
+ KMessageBox::sorry( window,
|
||||||
|
i18n("<qt>The file <b>%1</b> is an executable program. "
|
||||||
|
"For safety it will not be started.</qt>").arg(u.htmlURL()));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if ( noAuth )
|
||||||
|
{
|
||||||
|
- KMessageBoxWrapper::error( 0L,
|
||||||
|
+ KMessageBoxWrapper::error( window,
|
||||||
|
i18n("<qt>You do not have permission to run <b>%1</b>.</qt>").arg(u.htmlURL()) );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -182,7 +189,7 @@ pid_t KRun::runURL( const KURL& u, const
|
||||||
|
return displayOpenWithDialog( lst, tempFile, suggestedFileName );
|
||||||
|
}
|
||||||
|
|
||||||
|
- return KRun::run( *offer, lst, 0 /*window*/, tempFile, suggestedFileName );
|
||||||
|
+ return KRun::run( *offer, lst, window, asn, tempFile, suggestedFileName );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KRun::displayOpenWithDialog( const KURL::List& lst )
|
||||||
|
@@ -536,13 +543,13 @@ QString KRun::binaryName( const QString
|
||||||
|
}
|
||||||
|
|
||||||
|
static pid_t runCommandInternal( KProcess* proc, const KService* service, const QString& binName,
|
||||||
|
- const QString &execName, const QString & iconName )
|
||||||
|
+ const QString &execName, const QString & iconName, QWidget* window, QCString asn )
|
||||||
|
{
|
||||||
|
if (service && !service->desktopEntryPath().isEmpty()
|
||||||
|
&& !KDesktopFile::isAuthorizedDesktopFile( service->desktopEntryPath() ))
|
||||||
|
{
|
||||||
|
kdWarning() << "No authorization to execute " << service->desktopEntryPath() << endl;
|
||||||
|
- KMessageBox::sorry(0, i18n("You are not authorized to execute this file."));
|
||||||
|
+ KMessageBox::sorry(window, i18n("You are not authorized to execute this file."));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
QString bin = KRun::binaryName( binName, true );
|
||||||
|
@@ -550,10 +557,10 @@ static pid_t runCommandInternal( KProces
|
||||||
|
bool silent;
|
||||||
|
QCString wmclass;
|
||||||
|
KStartupInfoId id;
|
||||||
|
- bool startup_notify = KRun::checkStartupNotify( binName, service, &silent, &wmclass );
|
||||||
|
+ bool startup_notify = ( asn != "0" && KRun::checkStartupNotify( binName, service, &silent, &wmclass ));
|
||||||
|
if( startup_notify )
|
||||||
|
{
|
||||||
|
- id.initId();
|
||||||
|
+ id.initId( asn );
|
||||||
|
id.setupStartupEnv();
|
||||||
|
KStartupInfoData data;
|
||||||
|
data.setHostname();
|
||||||
|
@@ -572,6 +579,8 @@ static pid_t runCommandInternal( KProces
|
||||||
|
if( silent )
|
||||||
|
data.setSilent( KStartupInfoData::Yes );
|
||||||
|
data.setDesktop( KWin::currentDesktop());
|
||||||
|
+ if( window )
|
||||||
|
+ data.setLaunchedBy( window->winId());
|
||||||
|
KStartupInfo::sendStartup( id, data );
|
||||||
|
}
|
||||||
|
pid_t pid = KProcessRunner::run( proc, binName, id );
|
||||||
|
@@ -635,7 +644,8 @@ bool KRun::checkStartupNotify( const QSt
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static pid_t runTempService( const KService& _service, const KURL::List& _urls, bool tempFiles, const QString& suggestedFileName )
|
||||||
|
+static pid_t runTempService( const KService& _service, const KURL::List& _urls, QWidget* window,
|
||||||
|
+ const QCString& asn, bool tempFiles, const QString& suggestedFileName )
|
||||||
|
{
|
||||||
|
if (!_urls.isEmpty()) {
|
||||||
|
kdDebug(7010) << "runTempService: first url " << _urls.first().url() << endl;
|
||||||
|
@@ -654,7 +664,7 @@ static pid_t runTempService( const KServ
|
||||||
|
{
|
||||||
|
KURL::List singleUrl;
|
||||||
|
singleUrl.append(*it);
|
||||||
|
- runTempService( _service, singleUrl, tempFiles, suggestedFileName );
|
||||||
|
+ runTempService( _service, singleUrl, window, "", tempFiles, suggestedFileName );
|
||||||
|
}
|
||||||
|
KURL::List singleUrl;
|
||||||
|
singleUrl.append(_urls.first());
|
||||||
|
@@ -673,7 +683,7 @@ static pid_t runTempService( const KServ
|
||||||
|
proc->setWorkingDirectory(_service.path());
|
||||||
|
|
||||||
|
return runCommandInternal( proc, &_service, KRun::binaryName( _service.exec(), false ),
|
||||||
|
- _service.name(), _service.icon() );
|
||||||
|
+ _service.name(), _service.icon(), window, asn );
|
||||||
|
}
|
||||||
|
|
||||||
|
// WARNING: don't call this from processDesktopExec, since klauncher uses that too...
|
||||||
|
@@ -734,11 +744,22 @@ pid_t KRun::run( const KService& _servic
|
||||||
|
|
||||||
|
pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles )
|
||||||
|
{
|
||||||
|
- return run( _service, _urls, window, tempFiles, QString::null );
|
||||||
|
+ return run( _service, _urls, window, "", tempFiles, QString::null );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, const QCString& asn, bool tempFiles )
|
||||||
|
+{
|
||||||
|
+ return run( _service, _urls, window, asn, tempFiles, QString::null );
|
||||||
|
}
|
||||||
|
|
||||||
|
pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles, const QString& suggestedFileName )
|
||||||
|
{
|
||||||
|
+ return run( _service, _urls, window, "", tempFiles, suggestedFileName );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, const QCString& asn,
|
||||||
|
+ bool tempFiles, const QString& suggestedFileName )
|
||||||
|
+{
|
||||||
|
if (!_service.desktopEntryPath().isEmpty() &&
|
||||||
|
!KDesktopFile::isAuthorizedDesktopFile( _service.desktopEntryPath()))
|
||||||
|
{
|
||||||
|
@@ -759,7 +780,7 @@ pid_t KRun::run( const KService& _servic
|
||||||
|
|
||||||
|
if ( tempFiles || _service.desktopEntryPath().isEmpty() || !suggestedFileName.isEmpty() )
|
||||||
|
{
|
||||||
|
- return runTempService(_service, _urls, tempFiles, suggestedFileName);
|
||||||
|
+ return runTempService(_service, _urls, window, asn, tempFiles, suggestedFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
kdDebug(7010) << "KRun::run " << _service.desktopEntryPath() << endl;
|
||||||
|
@@ -773,9 +794,25 @@ pid_t KRun::run( const KService& _servic
|
||||||
|
|
||||||
|
QString error;
|
||||||
|
int pid = 0;
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+ QCString myasn = asn;
|
||||||
|
+ // startServiceByDesktopPath() doesn't take QWidget*, add it to the startup info now
|
||||||
|
+ if( window != NULL )
|
||||||
|
+ {
|
||||||
|
+ if( myasn.isEmpty())
|
||||||
|
+ myasn = KStartupInfo::createNewStartupId();
|
||||||
|
+ if( myasn != "0" )
|
||||||
|
+ {
|
||||||
|
+ KStartupInfoId id;
|
||||||
|
+ id.initId( myasn );
|
||||||
|
+ KStartupInfoData data;
|
||||||
|
+ data.setLaunchedBy( window->winId());
|
||||||
|
+ KStartupInfo::sendChange( id, data );
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
int i = KApplication::startServiceByDesktopPath(
|
||||||
|
- _service.desktopEntryPath(), urls.toStringList(), &error, 0L, &pid
|
||||||
|
+ _service.desktopEntryPath(), urls.toStringList(), &error, 0L, &pid, myasn
|
||||||
|
);
|
||||||
|
|
||||||
|
if (i != 0)
|
||||||
|
@@ -800,33 +837,47 @@ pid_t KRun::run( const QString& _exec, c
|
||||||
|
|
||||||
|
pid_t KRun::runCommand( QString cmd )
|
||||||
|
{
|
||||||
|
- return KRun::runCommand( cmd, QString::null, QString::null );
|
||||||
|
+ return KRun::runCommand( cmd, QString::null, QString::null, NULL, "" );
|
||||||
|
}
|
||||||
|
|
||||||
|
pid_t KRun::runCommand( const QString& cmd, const QString &execName, const QString & iconName )
|
||||||
|
{
|
||||||
|
+ return KRun::runCommand( cmd, execName, iconName, NULL, "" );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+pid_t KRun::runCommand( const QString& cmd, const QString &execName, const QString & iconName,
|
||||||
|
+ QWidget* window, const QCString& asn )
|
||||||
|
+{
|
||||||
|
kdDebug(7010) << "runCommand " << cmd << "," << execName << endl;
|
||||||
|
KProcess * proc = new KProcess;
|
||||||
|
proc->setUseShell(true);
|
||||||
|
*proc << cmd;
|
||||||
|
KService::Ptr service = KService::serviceByDesktopName( binaryName( execName, true ) );
|
||||||
|
- return runCommandInternal( proc, service.data(), binaryName( execName, false ), execName, iconName );
|
||||||
|
+ return runCommandInternal( proc, service.data(), binaryName( execName, false ), execName, iconName,
|
||||||
|
+ window, asn );
|
||||||
|
}
|
||||||
|
|
||||||
|
KRun::KRun( const KURL& url, mode_t mode, bool isLocalFile, bool showProgressInfo )
|
||||||
|
:m_timer(0,"KRun::timer")
|
||||||
|
{
|
||||||
|
- init (url, 0, mode, isLocalFile, showProgressInfo);
|
||||||
|
+ init (url, 0, "", mode, isLocalFile, showProgressInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
KRun::KRun( const KURL& url, QWidget* window, mode_t mode, bool isLocalFile,
|
||||||
|
bool showProgressInfo )
|
||||||
|
:m_timer(0,"KRun::timer")
|
||||||
|
{
|
||||||
|
- init (url, window, mode, isLocalFile, showProgressInfo);
|
||||||
|
+ init (url, window, "", mode, isLocalFile, showProgressInfo);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+KRun::KRun( const KURL& url, QWidget* window, const QCString& asn, mode_t mode, bool isLocalFile,
|
||||||
|
+ bool showProgressInfo )
|
||||||
|
+ :m_timer(0,"KRun::timer")
|
||||||
|
+{
|
||||||
|
+ init (url, window, asn, mode, isLocalFile, showProgressInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
-void KRun::init ( const KURL& url, QWidget* window, mode_t mode, bool isLocalFile,
|
||||||
|
+void KRun::init ( const KURL& url, QWidget* window, const QCString& asn, mode_t mode, bool isLocalFile,
|
||||||
|
bool showProgressInfo )
|
||||||
|
{
|
||||||
|
m_bFault = false;
|
||||||
|
@@ -842,6 +893,7 @@ void KRun::init ( const KURL& url, QWidg
|
||||||
|
d = new KRunPrivate;
|
||||||
|
d->m_runExecutables = true;
|
||||||
|
d->m_window = window;
|
||||||
|
+ d->m_asn = asn;
|
||||||
|
setEnableExternalBrowser(true);
|
||||||
|
|
||||||
|
// Start the timer. This means we will return to the event
|
||||||
|
@@ -942,7 +994,7 @@ void KRun::init()
|
||||||
|
KService::Ptr service = KService::serviceByStorageId( exec );
|
||||||
|
if (service)
|
||||||
|
{
|
||||||
|
- run( *service, urls );
|
||||||
|
+ run( *service, urls, d->m_window, d->m_asn );
|
||||||
|
ok = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1235,7 +1287,7 @@ void KRun::foundMimeType( const QString&
|
||||||
|
{
|
||||||
|
KURL::List lst;
|
||||||
|
lst.append( m_strURL );
|
||||||
|
- m_bFinished = KRun::run( *serv, lst );
|
||||||
|
+ m_bFinished = KRun::run( *serv, lst, d->m_window, d->m_asn );
|
||||||
|
/// Note: the line above means that if that service failed, we'll
|
||||||
|
/// go to runURL to maybe find another service, even though a dialog
|
||||||
|
/// box was displayed. That's good if runURL tries another service,
|
||||||
|
@@ -1250,7 +1302,7 @@ void KRun::foundMimeType( const QString&
|
||||||
|
m_strURL.setPath( d->m_localPath );
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!m_bFinished && KRun::runURL( m_strURL, type, false, d->m_runExecutables, d->m_suggestedFileName )){
|
||||||
|
+ if (!m_bFinished && KRun::runURL( m_strURL, type, d->m_window, d->m_asn, false, d->m_runExecutables, d->m_suggestedFileName )){
|
||||||
|
m_bFinished = true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Index: kdecore/kstartupinfo.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kstartupinfo.cpp.orig
|
||||||
|
+++ kdecore/kstartupinfo.cpp
|
||||||
|
@@ -1109,7 +1109,7 @@ unsigned long KStartupInfoId::timestamp(
|
||||||
|
struct KStartupInfoDataPrivate
|
||||||
|
{
|
||||||
|
KStartupInfoDataPrivate() : desktop( 0 ), wmclass( "" ), hostname( "" ),
|
||||||
|
- silent( KStartupInfoData::Unknown ), timestamp( -1U ), screen( -1 ) {}
|
||||||
|
+ silent( KStartupInfoData::Unknown ), timestamp( -1U ), screen( -1 ), xinerama( -1 ), launched_by( 0 ) {}
|
||||||
|
QString bin;
|
||||||
|
QString name;
|
||||||
|
QString description;
|
||||||
|
@@ -1121,6 +1121,8 @@ struct KStartupInfoDataPrivate
|
||||||
|
KStartupInfoData::TriState silent;
|
||||||
|
unsigned long timestamp;
|
||||||
|
int screen;
|
||||||
|
+ int xinerama;
|
||||||
|
+ WId launched_by;
|
||||||
|
};
|
||||||
|
|
||||||
|
QString KStartupInfoData::to_text() const
|
||||||
|
@@ -1151,6 +1153,10 @@ QString KStartupInfoData::to_text() cons
|
||||||
|
ret += QString::fromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp );
|
||||||
|
if( d->screen != -1 )
|
||||||
|
ret += QString::fromLatin1( " SCREEN=%1" ).arg( d->screen );
|
||||||
|
+ if( d->xinerama != -1 )
|
||||||
|
+ ret += QString::fromLatin1( " XINERAMA=%1" ).arg( d->xinerama );
|
||||||
|
+ if( d->launched_by != 0 )
|
||||||
|
+ ret += QString::fromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1169,6 +1175,8 @@ KStartupInfoData::KStartupInfoData( cons
|
||||||
|
const QString silent_str = QString::fromLatin1( "SILENT=" );
|
||||||
|
const QString timestamp_str = QString::fromLatin1( "TIMESTAMP=" );
|
||||||
|
const QString screen_str = QString::fromLatin1( "SCREEN=" );
|
||||||
|
+ const QString xinerama_str = QString::fromLatin1( "XINERAMA=" );
|
||||||
|
+ const QString launched_by_str = QString::fromLatin1( "LAUNCHED_BY=" );
|
||||||
|
for( QStringList::Iterator it = items.begin();
|
||||||
|
it != items.end();
|
||||||
|
++it )
|
||||||
|
@@ -1199,6 +1207,10 @@ KStartupInfoData::KStartupInfoData( cons
|
||||||
|
d->timestamp = get_unum( *it );
|
||||||
|
else if( ( *it ).startsWith( screen_str ))
|
||||||
|
d->screen = get_num( *it );
|
||||||
|
+ else if( ( *it ).startsWith( xinerama_str ))
|
||||||
|
+ d->xinerama = get_num( *it );
|
||||||
|
+ else if( ( *it ).startsWith( launched_by_str ))
|
||||||
|
+ d->launched_by = get_num( *it );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1242,6 +1254,10 @@ void KStartupInfoData::update( const KSt
|
||||||
|
d->timestamp = data_P.timestamp();
|
||||||
|
if( data_P.screen() != -1 )
|
||||||
|
d->screen = data_P.screen();
|
||||||
|
+ if( data_P.xinerama() != -1 && xinerama() != -1 ) // don't overwrite
|
||||||
|
+ d->xinerama = data_P.xinerama();
|
||||||
|
+ if( data_P.launchedBy() != 0 && launchedBy() != 0 ) // don't overwrite
|
||||||
|
+ d->launched_by = data_P.launchedBy();
|
||||||
|
}
|
||||||
|
|
||||||
|
KStartupInfoData::KStartupInfoData()
|
||||||
|
@@ -1412,6 +1428,26 @@ int KStartupInfoData::screen() const
|
||||||
|
return d->screen;
|
||||||
|
}
|
||||||
|
|
||||||
|
+void KStartupInfoData::setXinerama( int xinerama )
|
||||||
|
+ {
|
||||||
|
+ d->xinerama = xinerama;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+int KStartupInfoData::xinerama() const
|
||||||
|
+ {
|
||||||
|
+ return d->xinerama;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+void KStartupInfoData::setLaunchedBy( WId window )
|
||||||
|
+ {
|
||||||
|
+ d->launched_by = window;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+WId KStartupInfoData::launchedBy() const
|
||||||
|
+ {
|
||||||
|
+ return d->launched_by;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
static
|
||||||
|
long get_num( const QString& item_P )
|
||||||
|
{
|
||||||
|
Index: kdecore/netwm_def.h
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/netwm_def.h.orig
|
||||||
|
+++ kdecore/netwm_def.h
|
||||||
|
@@ -610,6 +610,7 @@ public:
|
||||||
|
WM2WindowRole = 1<<11, ///< @since 3.3
|
||||||
|
WM2ClientMachine = 1<<12, ///< @since 3.3
|
||||||
|
WM2ShowingDesktop = 1<<13, ///< @since 3.5
|
||||||
|
+ WM2FullPlacement = 1<<14,
|
||||||
|
WM2DesktopLayout = 1<<15 ///< @since 3.5.8
|
||||||
|
};
|
||||||
|
|
||||||
|
Index: kdecore/netwm.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/netwm.cpp.orig
|
||||||
|
+++ kdecore/netwm.cpp
|
||||||
|
@@ -145,6 +145,9 @@ static Atom net_wm_state_stays_on_top =
|
||||||
|
// used to determine whether application window is managed or not
|
||||||
|
static Atom xa_wm_state = 0;
|
||||||
|
|
||||||
|
+// ability flags
|
||||||
|
+static Atom net_wm_full_placement = 0;
|
||||||
|
+
|
||||||
|
static Bool netwm_atoms_created = False;
|
||||||
|
const unsigned long netwm_sendevent_mask = (SubstructureRedirectMask|
|
||||||
|
SubstructureNotifyMask);
|
||||||
|
@@ -236,7 +239,7 @@ static int wcmp(const void *a, const voi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-static const int netAtomCount = 84;
|
||||||
|
+static const int netAtomCount = 85;
|
||||||
|
static void create_atoms(Display *d) {
|
||||||
|
static const char * const names[netAtomCount] =
|
||||||
|
{
|
||||||
|
@@ -330,7 +333,9 @@ static void create_atoms(Display *d) {
|
||||||
|
"_KDE_NET_WM_TEMPORARY_RULES",
|
||||||
|
|
||||||
|
"WM_STATE",
|
||||||
|
- "WM_PROTOCOLS"
|
||||||
|
+ "WM_PROTOCOLS",
|
||||||
|
+
|
||||||
|
+ "_NET_WM_FULL_PLACEMENT"
|
||||||
|
};
|
||||||
|
|
||||||
|
Atom atoms[netAtomCount], *atomsp[netAtomCount] =
|
||||||
|
@@ -425,7 +430,9 @@ static void create_atoms(Display *d) {
|
||||||
|
&kde_net_wm_temporary_rules,
|
||||||
|
|
||||||
|
&xa_wm_state,
|
||||||
|
- &wm_protocols
|
||||||
|
+ &wm_protocols,
|
||||||
|
+
|
||||||
|
+ &net_wm_full_placement
|
||||||
|
};
|
||||||
|
|
||||||
|
assert( !netwm_atoms_created );
|
||||||
|
@@ -1355,6 +1362,8 @@ void NETRootInfo::setSupported() {
|
||||||
|
|
||||||
|
if (p->properties[ PROTOCOLS2 ] & WM2KDETemporaryRules)
|
||||||
|
atoms[pnum++] = kde_net_wm_temporary_rules;
|
||||||
|
+ if (p->properties[ PROTOCOLS2 ] & WM2FullPlacement)
|
||||||
|
+ atoms[pnum++] = net_wm_full_placement;
|
||||||
|
|
||||||
|
XChangeProperty(p->display, p->root, net_supported, XA_ATOM, 32,
|
||||||
|
PropModeReplace, (unsigned char *) atoms, pnum);
|
||||||
|
@@ -1587,6 +1596,8 @@ void NETRootInfo::updateSupportedPropert
|
||||||
|
|
||||||
|
else if( atom == kde_net_wm_temporary_rules )
|
||||||
|
p->properties[ PROTOCOLS2 ] |= WM2KDETemporaryRules;
|
||||||
|
+ else if( atom == net_wm_full_placement )
|
||||||
|
+ p->properties[ PROTOCOLS2 ] |= WM2FullPlacement;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern Time qt_x_user_time;
|
||||||
|
Index: kdecore/kstartupinfo.h
|
||||||
|
===================================================================
|
||||||
|
--- kdecore/kstartupinfo.h.orig
|
||||||
|
+++ kdecore/kstartupinfo.h
|
||||||
|
@@ -635,6 +635,30 @@ class KDECORE_EXPORT KStartupInfoData
|
||||||
|
* This is usually not necessary to set, as it's set by default to qt_xscreen().
|
||||||
|
*/
|
||||||
|
void setScreen( int screen );
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * The Xinerama screen for the startup notification, -1 if unknown.
|
||||||
|
+ */
|
||||||
|
+ int xinerama() const;
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Sets the Xinerama screen for the startup notification ( i.e. the screeen on which
|
||||||
|
+ * the starting application should appear ).
|
||||||
|
+ * @param xinerama the Xinerama screen for the startup notification
|
||||||
|
+ */
|
||||||
|
+ void setXinerama( int xinerama );
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * The toplevel window of the application that caused this startup notification,
|
||||||
|
+ * 0 if unknown.
|
||||||
|
+ */
|
||||||
|
+ WId launchedBy() const;
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Sets the toplevel window of the application that caused this startup notification.
|
||||||
|
+ * @param window window ID of the toplevel window that is responsible for this startup
|
||||||
|
+ */
|
||||||
|
+ void setLaunchedBy( WId window );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the notification data from the given data. Some data, such as the desktop
|
@ -0,0 +1,44 @@
|
|||||||
|
Index: catalog.xml
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ catalog.xml
|
||||||
|
@@ -0,0 +1,39 @@
|
||||||
|
+<?xml version="1.0"?>
|
||||||
|
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
|
||||||
|
+"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
|
||||||
|
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
|
||||||
|
+ prefer="public">
|
||||||
|
+<public publicId="-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN"
|
||||||
|
+ uri="dtd/kdex.dtd" />
|
||||||
|
+<public publicId="-//KDE//ELEMENTS DocBook XML Hierarchy Redeclarations 2 V1.0//EN"
|
||||||
|
+ uri="dtd/rdbhier2.elements" />
|
||||||
|
+<public publicId="-//KDE//ELEMENTS DocBook XML Pool Redeclarations V1.1//EN"
|
||||||
|
+ uri="dtd/rdbpool.elements" />
|
||||||
|
+<public publicId="-//KDE//ELEMENTS DocBook XML Modifications (Restrictions) V1.1//EN"
|
||||||
|
+ uri="dtd/modifications.elements" />
|
||||||
|
+
|
||||||
|
+<public publicId="-//KDE//ENTITIES DocBook XML General Entity Declarations V1.2//EN"
|
||||||
|
+ uri="entities/general.entities" />
|
||||||
|
+<public publicId="-//KDE//ENTITIES DocBook XML General Entity Declarations (Persons) V1.0//EN"
|
||||||
|
+ uri="entities/contributor.entities" />
|
||||||
|
+
|
||||||
|
+<public publicId="-//KDE//ENTITIES DocBook XML Localisation Entity Declarations V1.0//EN"
|
||||||
|
+ uri="entities/l10n.entities" />
|
||||||
|
+
|
||||||
|
+<public publicId="-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN"
|
||||||
|
+ uri="obsolete/kdex.dtd" />
|
||||||
|
+<public publicId="-//KDE//ENTITIES DocBook XML General Entity Declarations V1.1//EN"
|
||||||
|
+ uri="obsolete/general.entities" />
|
||||||
|
+<public publicId="-//KDE//ELEMENTS DocBook XML Pool Redeclarations V1.0//EN"
|
||||||
|
+ uri="obsolete/rdbpool.elements" />
|
||||||
|
+<public publicId="-//KDE//ELEMENTS DocBook XML Modifications V1.0//EN"
|
||||||
|
+ uri="obsolete/modifications.elements" />
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+<public publicId="-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.0//EN"
|
||||||
|
+ uri="obsolete/kdex-412-10.dtd" />
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+<public publicId="-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN"
|
||||||
|
+ uri="obsolete/kdex-412-10.dtd" />
|
||||||
|
+</catalog>
|
@ -0,0 +1,47 @@
|
|||||||
|
http://www.kde.org/info/security/advisory-20091027-1.txt
|
||||||
|
|
||||||
|
Index: xmlhttprequest.cpp
|
||||||
|
===================================================================
|
||||||
|
--- khtml/ecma/xmlhttprequest.cpp (revision 954808)
|
||||||
|
+++ khtml/ecma/xmlhttprequest.cpp (working copy)
|
||||||
|
@@ -342,17 +342,17 @@
|
||||||
|
{
|
||||||
|
aborted = false;
|
||||||
|
|
||||||
|
+ const QString protocol = url.protocol().lower();
|
||||||
|
+ // Abandon the request when the protocol is other than "http",
|
||||||
|
+ // instead of blindly doing a KIO::get on other protocols like file:/.
|
||||||
|
+ if (!protocol.startsWith("http") && !protocol.startsWith("webdav"))
|
||||||
|
+ {
|
||||||
|
+ abort();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (method == "post") {
|
||||||
|
- QString protocol = url.protocol().lower();
|
||||||
|
|
||||||
|
- // Abondon the request when the protocol is other than "http",
|
||||||
|
- // instead of blindly changing it to a "get" request.
|
||||||
|
- if (!protocol.startsWith("http") && !protocol.startsWith("webdav"))
|
||||||
|
- {
|
||||||
|
- abort();
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
// FIXME: determine post encoding correctly by looking in headers
|
||||||
|
// for charset.
|
||||||
|
QByteArray buf;
|
||||||
|
@@ -763,11 +763,11 @@
|
||||||
|
if (obj.isValid() && obj.inherits(&DOMDocument::info)) {
|
||||||
|
DOM::Node docNode = static_cast<KJS::DOMDocument *>(obj.imp())->toNode();
|
||||||
|
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl *>(docNode.handle());
|
||||||
|
-
|
||||||
|
+
|
||||||
|
try {
|
||||||
|
body = doc->toString().string();
|
||||||
|
// FIXME: also need to set content type, including encoding!
|
||||||
|
-
|
||||||
|
+
|
||||||
|
} catch(DOM::DOMException& e) {
|
||||||
|
Object err = Error::create(exec, GeneralError, "Exception serializing document");
|
||||||
|
exec->setException(err);
|
Loading…
Reference in new issue