KDE 4.2.1

This commit is contained in:
Lukas Tinkl 2009-02-27 16:57:29 +00:00
parent e941411d71
commit cafb904feb
11 changed files with 81 additions and 815 deletions

View File

@ -0,0 +1,47 @@
diff -up kdelibs-4.2.0/kdeui/util/fixx11h.h.orig kdelibs-4.2.0/kdeui/util/fixx11h.h
--- kdelibs-4.2.0/kdeui/util/fixx11h.h.orig 2008-05-21 13:08:51.000000000 +0200
+++ kdelibs-4.2.0/kdeui/util/fixx11h.h 2009-02-26 12:14:01.000000000 +0100
@@ -251,13 +251,21 @@ const int FontChange = XFontChange;
#ifndef FIXX11H_index
#define FIXX11H_index
inline
+#if defined __cplusplus && __GNUC_PREREQ (4, 4)
+char* Xindex( char* s, int c )
+#else
char* Xindex( const char* s, int c )
+#endif
{
return index( s, c );
}
#undef index
inline
+#if defined __cplusplus && __GNUC_PREREQ (4, 4)
+char* index( char* s, int c )
+#else
char* index( const char* s, int c )
+#endif
{
return Xindex( s, c );
}
@@ -271,13 +279,21 @@ char* index( const char* s, int c )
#ifndef FIXX11H_rindex
#define FIXX11H_rindex
inline
+# if defined __cplusplus && __GNUC_PREREQ (4, 4)
+char* Xrindex( char* s, int c )
+#else
char* Xrindex( const char* s, int c )
+#endif
{
return rindex( s, c );
}
#undef rindex
inline
+# if defined __cplusplus && __GNUC_PREREQ (4, 4)
+char* rindex( char* s, int c )
+#else
char* rindex( const char* s, int c )
+#endif
{
return Xrindex( s, c );
}

View File

@ -1,88 +0,0 @@
--- branches/KDE/4.2/kdelibs/kded/kded.cpp 2009/01/12 21:32:29 910250
+++ branches/KDE/4.2/kdelibs/kded/kded.cpp 2009/01/30 20:28:25 918838
@@ -115,9 +115,8 @@
KToolInvocation::kdeinitExecWait( "kdontchangethehostname", args );
}
-Kded::Kded(bool checkUpdates)
- : b_checkUpdates(checkUpdates),
- m_needDelayedCheck(false)
+Kded::Kded()
+ : m_needDelayedCheck(false)
{
_self = this;
@@ -280,7 +279,7 @@
KSharedConfig::Ptr config = KGlobal::config();
// Ensure the service exists.
KService::Ptr service = KService::serviceByDesktopPath("kded/"+obj+".desktop");
- if (!service)
+ if (!service)
return;
KConfigGroup cg(config, QString("Module-%1").arg(service->desktopEntryName()));
cg.writeEntry("autoload", autoload);
@@ -290,7 +289,7 @@
bool Kded::isModuleAutoloaded(const QString &obj) const
{
KService::Ptr s = KService::serviceByDesktopPath("kded/"+obj+".desktop");
- if (!s)
+ if (!s)
return false;
return isModuleAutoloaded(s);
}
@@ -307,7 +306,7 @@
bool Kded::isModuleLoadedOnDemand(const QString &obj) const
{
KService::Ptr s = KService::serviceByDesktopPath("kded/"+obj+".desktop");
- if (!s)
+ if (!s)
return false;
return isModuleLoadedOnDemand(s);
}
@@ -446,7 +445,7 @@
void Kded::updateDirWatch()
{
- if (!b_checkUpdates) return;
+ if (!bCheckUpdates) return;
delete m_pDirWatch;
m_pDirWatch = new KDirWatch;
@@ -471,7 +470,7 @@
{
delete KSycoca::self();
- if (!b_checkUpdates) return;
+ if (!bCheckUpdates) return;
if (delayedCheck) return;
@@ -921,7 +920,7 @@
checkStamps = cg.readEntry("CheckFileStamps", true);
delayedCheck = cg.readEntry("DelayedCheck", false);
- Kded *kded = new Kded(false); // Build data base
+ Kded *kded = new Kded(); // Build data base
KDE_signal(SIGTERM, sighandler);
KDE_signal(SIGHUP, sighandler);
--- branches/KDE/4.2/kdelibs/kded/kded.h 2009/01/06 17:13:38 906699
+++ branches/KDE/4.2/kdelibs/kded/kded.h 2009/01/30 20:28:25 918838
@@ -41,7 +41,7 @@
{
Q_OBJECT
public:
- Kded(bool checkUpdates);
+ Kded();
virtual ~Kded();
static Kded *self() { return _self;}
@@ -186,8 +186,6 @@
*/
KDirWatch* m_pDirWatch;
- bool b_checkUpdates;
-
/**
* When a desktop file is updated, a timer is started (5 sec)
* before rebuilding the binary - so that multiple updates result

View File

@ -1,301 +0,0 @@
Index: kded/kbuildsycoca.cpp
===================================================================
--- kded/kbuildsycoca.cpp (Revision 921137)
+++ kded/kbuildsycoca.cpp (Revision 921138)
@@ -514,7 +514,7 @@
// Calculate per-servicetype/mimetype data
mimeTypeFactory->parseSubclasses();
- serviceFactory->populateServiceTypes();
+ serviceFactory->postProcessServices();
// Write factory data....
for(KSycocaFactoryList::Iterator factory = factories()->begin();
Index: kded/kbuildservicefactory.cpp
===================================================================
--- kded/kbuildservicefactory.cpp (Revision 921137)
+++ kded/kbuildservicefactory.cpp (Revision 921138)
@@ -193,13 +193,50 @@
}
}
+void KBuildServiceFactory::postProcessServices()
+{
+ // By doing all this here rather than in addEntry (and removing when replacing
+ // with local override), we only do it for the final applications.
+ // For every service...
+ KSycocaEntryDict::Iterator itserv = m_entryDict->begin();
+ const KSycocaEntryDict::Iterator endserv = m_entryDict->end();
+ for( ; itserv != endserv ; ++itserv ) {
+
+ KSycocaEntry::Ptr entry = *itserv;
+ KService::Ptr service = KService::Ptr::staticCast(entry);
+
+ if (!service->isDeleted()) {
+ const QString parent = service->parentApp();
+ if (!parent.isEmpty())
+ m_serviceGroupFactory->addNewChild(parent, KSycocaEntry::Ptr::staticCast(service));
+ }
+
+ const QString name = service->desktopEntryName();
+ m_nameDict->add(name, entry);
+ m_nameMemoryHash.insert(name, service);
+
+ const QString relName = service->entryPath();
+ //kDebug(7021) << "adding service" << service.data() << service->menuId() << "name=" << name << "relName=" << relName;
+ m_relNameDict->add(relName, entry);
+ m_relNameMemoryHash.insert(relName, service); // for KMimeAssociations
+
+ const QString menuId = service->menuId();
+ if (!menuId.isEmpty()) { // empty for services, non-empty for applications
+ m_menuIdDict->add(menuId, entry);
+ m_menuIdMemoryHash.insert(menuId, service); // for KMimeAssociations
+ }
+ }
+ populateServiceTypes();
+}
+
void KBuildServiceFactory::populateServiceTypes()
{
// For every service...
KSycocaEntryDict::Iterator itserv = m_entryDict->begin();
const KSycocaEntryDict::Iterator endserv = m_entryDict->end();
for( ; itserv != endserv ; ++itserv ) {
+
KService::Ptr service = KService::Ptr::staticCast(*itserv);
QVector<KService::ServiceTypeAndPreference> serviceTypeList = service->_k_accessServiceTypes();
//bool hasAllAll = false;
@@ -336,30 +373,18 @@
if (m_dupeDict.contains(newEntry))
return;
- KSycocaFactory::addEntry(newEntry);
-
const KService::Ptr service = KService::Ptr::staticCast( newEntry );
m_dupeDict.insert(newEntry);
- if (!service->isDeleted()) {
- const QString parent = service->parentApp();
- if (!parent.isEmpty())
- m_serviceGroupFactory->addNewChild(parent, KSycocaEntry::Ptr::staticCast(service));
+ KSycocaEntry::Ptr oldEntry = m_entryDict->value(newEntry->storageId());
+ if (oldEntry) {
+ // Already exists -> replace
+ //KService::Ptr oldService = KService::Ptr::staticCast(oldEntry);
+ // We found a more-local override, e.g. ~/.local/share/applications/kde4/foo.desktop
+ // So forget about the more global file.
+ //kDebug(7021) << "removing" << oldService.data() << oldService->entryPath() << "because of" << service->entryPath();
+ KSycocaFactory::removeEntry(newEntry->storageId());
}
- const QString name = service->desktopEntryName();
- m_nameDict->add( name, newEntry );
- m_nameMemoryHash.insert(name, service);
-
- const QString relName = service->entryPath();
- //kDebug(7021) << "adding service" << service->menuId() << "name=" << name << "relName=" << relName;
- m_relNameDict->add( relName, newEntry );
- m_relNameMemoryHash.insert(relName, service); // for KMimeAssociations
-
- const QString menuId = service->menuId();
- if (!menuId.isEmpty()) {
- m_menuIdDict->add( menuId, newEntry );
- m_menuIdMemoryHash.insert(menuId, service); // for KMimeAssociations
- }
+ KSycocaFactory::addEntry(newEntry);
}
-
Index: kded/vfolder_menu.cpp
===================================================================
--- kded/vfolder_menu.cpp (Revision 921137)
+++ kded/vfolder_menu.cpp (Revision 921138)
@@ -349,7 +349,7 @@
VFolderMenu::addApplication(const QString &id, KService::Ptr service)
{
service->setMenuId(id);
- m_appsInfo->applications.insert(id, service);
+ m_appsInfo->applications.insert(id, service); // replaces, if already there
m_serviceFactory->addEntry(KSycocaEntry::Ptr::staticCast(service));
}
@@ -1029,7 +1029,7 @@
void
VFolderMenu::processKDELegacyDirs()
{
-kDebug(7021) << "processKDELegacyDirs()";
+ kDebug(7021);
QHash<QString,KService::Ptr> items;
QString prefix = "kde4-";
@@ -1091,7 +1091,7 @@
void
VFolderMenu::processLegacyDir(const QString &dir, const QString &relDir, const QString &prefix)
{
-kDebug(7021).nospace() << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix << ")";
+ kDebug(7021).nospace() << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix << ")";
QHash<QString,KService::Ptr> items;
// We look for a set of files.
Index: kded/kbuildservicefactory.h
===================================================================
--- kded/kbuildservicefactory.h (Revision 921137)
+++ kded/kbuildservicefactory.h (Revision 921138)
@@ -83,9 +83,10 @@
*/
static QStringList resourceTypes();
- void populateServiceTypes();
+ void postProcessServices();
private:
+ void populateServiceTypes();
void saveOfferList(QDataStream &str);
void collectInheritedServices();
void collectInheritedServices(KMimeType::Ptr mime, QSet<KMimeType::Ptr>& visitedMimes);
Index: kdecore/sycoca/ksycocaentry_p.h
===================================================================
--- kdecore/sycoca/ksycocaentry_p.h (Revision 921137)
+++ kdecore/sycoca/ksycocaentry_p.h (Revision 921138)
@@ -23,7 +23,7 @@
#define K_SYCOCATYPE( type, baseclass ) \
virtual bool isType(KSycocaType t) const { if (t == type) return true; return baseclass::isType(t);} \
- virtual KSycocaType sycocaType() const { return type; }
+ virtual KSycocaType sycocaType() const { return type; }
class KSycocaEntryPrivate
@@ -68,6 +68,8 @@
virtual QString name() const = 0;
+ virtual QString storageId() const { return name(); }
+
int offset;
bool deleted;
QString path;
Index: kdecore/sycoca/ksycocaentry.cpp
===================================================================
--- kdecore/sycoca/ksycocaentry.cpp (Revision 921137)
+++ kdecore/sycoca/ksycocaentry.cpp (Revision 921138)
@@ -106,6 +106,12 @@
return d->path;
}
+QString KSycocaEntry::storageId() const
+{
+ Q_D(const KSycocaEntry);
+ return d->storageId();
+}
+
bool KSycocaEntry::isDeleted() const
{
Q_D(const KSycocaEntry);
@@ -164,5 +170,3 @@
Q_D(const KSycocaEntry);
return d->property(name);
}
-
-
Index: kdecore/sycoca/ksycocaentry.h
===================================================================
--- kdecore/sycoca/ksycocaentry.h (Revision 921137)
+++ kdecore/sycoca/ksycocaentry.h (Revision 921138)
@@ -86,6 +86,13 @@
QString entryPath() const;
/**
+ * @return the unique ID for this entry
+ * In practice, this is storageId() for KService and name() for everything else.
+ * \since 4.2.1
+ */
+ QString storageId() const;
+
+ /**
* @return true if valid
*/
bool isValid() const;
@@ -117,7 +124,7 @@
*/
void setDeleted( bool deleted );
-
+
/*
* @returns true, if this is a separator
*/
Index: kdecore/sycoca/ksycocafactory.cpp
===================================================================
--- kdecore/sycoca/ksycocafactory.cpp (Revision 921137)
+++ kdecore/sycoca/ksycocafactory.cpp (Revision 921138)
@@ -150,12 +150,8 @@
if (!d->m_sycocaDict) return; // Error!
- // Note that we use a QMultiHash since there can be several entries
- // with the same name (e.g. kfmclient.desktop and konqbrowser.desktop both
- // have Name=Konqueror).
-
- const QString name = newEntry->name();
- m_entryDict->insertMulti( name, newEntry );
+ const QString name = newEntry->storageId();
+ m_entryDict->insert( name, newEntry );
d->m_sycocaDict->add( name, newEntry );
}
Index: kdecore/sycoca/ksycoca.cpp
===================================================================
--- kdecore/sycoca/ksycoca.cpp (Revision 921137)
+++ kdecore/sycoca/ksycoca.cpp (Revision 921138)
@@ -43,7 +43,7 @@
* If the existing file is outdated, it will not get read
* but instead we'll ask kded to regenerate a new one...
*/
-#define KSYCOCA_VERSION 130
+#define KSYCOCA_VERSION 131
/**
* Sycoca file name, used internally (by kbuildsycoca)
Index: kdecore/services/kservice_p.h
===================================================================
--- kdecore/services/kservice_p.h (Revision 921137)
+++ kdecore/services/kservice_p.h (Revision 921138)
@@ -51,6 +51,13 @@
return m_strName;
}
+ virtual QString storageId() const
+ {
+ if (!menuId.isEmpty())
+ return menuId;
+ return path;
+ }
+
virtual bool isValid() const
{
return m_bValid;
Index: kdecore/services/kservice.cpp
===================================================================
--- kdecore/services/kservice.cpp (Revision 921137)
+++ kdecore/services/kservice.cpp (Revision 921138)
@@ -704,7 +704,7 @@
return QString();
}
}
-
+
return it->toString();
}
@@ -736,9 +736,7 @@
QString KService::storageId() const
{
Q_D(const KService);
- if (!d->menuId.isEmpty())
- return d->menuId;
- return entryPath();
+ return d->storageId();
}
QString KService::locateLocal() const

View File

@ -1,12 +0,0 @@
Index: kdeui/widgets/kmainwindow.cpp
===================================================================
--- kdeui/widgets/kmainwindow.cpp (Revision 918168)
+++ kdeui/widgets/kmainwindow.cpp (Revision 918169)
@@ -461,6 +461,7 @@
KMainWindow::~KMainWindow()
{
sMemberList->removeAll( this );
+ delete k_ptr->dockResizeListener; //so we don't get anymore events after k_ptr is destroyed
delete k_ptr;
KGlobal::deref();
}

View File

@ -1,13 +0,0 @@
diff -up kdelibs-4.2.0/plasma/extender.cpp.orig kdelibs-4.2.0/plasma/extender.cpp
--- kdelibs-4.2.0/plasma/extender.cpp.orig 2009-02-12 21:55:46.000000000 +0100
+++ kdelibs-4.2.0/plasma/extender.cpp 2009-02-12 21:56:54.000000000 +0100
@@ -467,6 +467,9 @@ void ExtenderPrivate::updateBorders()
void ExtenderPrivate::adjustSizeHints()
{
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 90, 0))
+ return;
+#endif
//FIXME: what happens in this function are some nasty workarounds for a bug in qt4.4's QGL.
//Alexis has told me they are working on a fix for qt4.5, so this can be removed once the bug
//has been fixed in Qt.

View File

@ -1,28 +0,0 @@
--- trunk/KDE/kdelibs/kio/kio/tcpslavebase.cpp 2009/01/14 00:07:11 910707
+++ trunk/KDE/kdelibs/kio/kio/tcpslavebase.cpp 2009/01/14 00:07:20 910708
@@ -177,8 +177,6 @@
success = d->socket.waitForBytesWritten(0);
}
- d->socket.flush(); //this is supposed to get the data on the wire faster
-
if (d->socket.state() != KTcpSocket::ConnectedState || !success) {
kDebug(7027) << "Write failed, will return -1! Socket error is"
<< d->socket.error() << ", Socket state is" << d->socket.state()
@@ -198,10 +196,12 @@
return -1;
}
- if (d->isBlocking && !d->socket.bytesAvailable()) {
- d->socket.waitForReadyRead(-1);
- } else {
- d->socket.waitForReadyRead(0);
+ if (!d->socket.bytesAvailable()) {
+ if (d->isBlocking) {
+ d->socket.waitForReadyRead(-1);
+ } else {
+ d->socket.waitForReadyRead(0);
+ }
}
return d->socket.read(data, len);

View File

@ -1,130 +0,0 @@
Index: kio/kio/copyjob.h
===================================================================
--- kio/kio/copyjob.h (revision 917169)
+++ kio/kio/copyjob.h (revision 917170)
@@ -245,6 +245,7 @@
protected:
CopyJob(CopyJobPrivate &dd);
+ void emitResult();
private:
Q_PRIVATE_SLOT(d_func(), void slotStart())
Index: kio/kio/copyjob.cpp
===================================================================
--- kio/kio/copyjob.cpp (revision 917169)
+++ kio/kio/copyjob.cpp (revision 917170)
@@ -153,7 +153,7 @@
QList<CopyInfo> dirs;
KUrl::List dirsToRemove;
KUrl::List m_srcList;
- KUrl::List m_skippedSourceUrls;
+ KUrl::List m_successSrcList;
KUrl::List::const_iterator m_currentStatSrc;
bool m_bCurrentSrcIsDir;
bool m_bCurrentOperationIsLink;
@@ -770,10 +770,6 @@
void CopyJobPrivate::skip( const KUrl & sourceUrl )
{
- // If this is one if toplevel sources,
- // remove it from d->m_srcList, for a correct FilesRemoved() signal
- // But don't do it right away, we have iterators into that list (#157601)
- m_skippedSourceUrls.append( sourceUrl );
dirsToRemove.removeAll( sourceUrl );
}
@@ -857,6 +853,7 @@
{
//this is required for the undo feature
emit q->copyingDone( q, (*it).uSource, (*it).uDest, (*it).mtime, true, false );
+ m_successSrcList.append((*it).uSource);
m_directoriesCopied.append( *it );
dirs.erase( it );
}
@@ -1118,6 +1115,7 @@
emit q->copyingDone( q, (*it).uSource, (*it).uDest, (*it).mtime, false, false );
if (m_mode == CopyJob::Move)
org::kde::KDirNotify::emitFileMoved( (*it).uSource.url(), (*it).uDest.url() );
+ m_successSrcList.append((*it).uSource);
}
// remove from list, to move on to next file
files.erase( it );
@@ -1372,7 +1370,7 @@
KIO::Job * newjob = 0;
if ( m_mode == CopyJob::Link ) {
// User requested that a symlink be made
- JobFlags flags = bOverwrite ? Overwrite : DefaultFlags;
+ const JobFlags flags = bOverwrite ? Overwrite : DefaultFlags;
newjob = linkNextFile(uSource, uDest, flags);
if (!newjob)
return;
@@ -1384,7 +1382,7 @@
(uSource.pass() == uDest.pass()))
// Copying a symlink - only on the same protocol/host/etc. (#5601, downloading an FTP file through its link),
{
- JobFlags flags = bOverwrite ? Overwrite : DefaultFlags;
+ const JobFlags flags = bOverwrite ? Overwrite : DefaultFlags;
KIO::SimpleJob *newJob = KIO::symlink( (*it).linkDest, uDest, flags | HideProgressInfo /*no GUI*/ );
Scheduler::scheduleJob(newJob);
newjob = newJob;
@@ -1509,23 +1507,6 @@
// but then we need to jump to the else part below. Maybe with a recursive call?
#endif
} else {
- // Finished - tell the world
- if ( !m_bOnlyRenames )
- {
- KUrl url( m_globalDest );
- if ( m_globalDestinationState != DEST_IS_DIR || m_asMethod )
- url.setPath( url.directory() );
- //kDebug(7007) << "KDirNotify'ing FilesAdded " << url;
- org::kde::KDirNotify::emitFilesAdded( url.url() );
-
- Q_FOREACH(const KUrl& url, m_skippedSourceUrls)
- m_srcList.removeAll(url);
-
- if ( m_mode == CopyJob::Move && !m_srcList.isEmpty() ) {
- //kDebug(7007) << "KDirNotify'ing FilesRemoved " << m_srcList.toStringList();
- org::kde::KDirNotify::emitFilesRemoved( m_srcList.toStringList() );
- }
- }
if (m_reportTimer)
m_reportTimer->stop();
--m_processedFiles; // undo the "start at 1" hack
@@ -1535,6 +1516,27 @@
}
}
+void CopyJob::emitResult()
+{
+ Q_D(CopyJob);
+ // Before we go, tell the world about the changes that were made.
+ // Even if some error made us abort midway, we might still have done
+ // part of the job so we better update the views! (#118583)
+ if (!d->m_bOnlyRenames) {
+ KUrl url(d->m_globalDest);
+ if (d->m_globalDestinationState != DEST_IS_DIR || d->m_asMethod)
+ url.setPath(url.directory());
+ //kDebug(7007) << "KDirNotify'ing FilesAdded " << url;
+ org::kde::KDirNotify::emitFilesAdded( url.url() );
+
+ if (d->m_mode == CopyJob::Move && !d->m_successSrcList.isEmpty()) {
+ kDebug(7007) << "KDirNotify'ing FilesRemoved" << d->m_successSrcList.toStringList();
+ org::kde::KDirNotify::emitFilesRemoved(d->m_successSrcList.toStringList());
+ }
+ }
+ Job::emitResult();
+}
+
void CopyJobPrivate::slotProcessedSize( KJob*, qulonglong data_size )
{
Q_Q(CopyJob);
@@ -1801,6 +1803,7 @@
kDebug(7007) << "Renaming succeeded, move on";
++m_processedFiles;
emit q->copyingDone( q, *m_currentStatSrc, dest, -1 /*mtime unknown, and not needed*/, true, true );
+ m_successSrcList.append(*m_currentStatSrc);
statNextSrc();
}
}

View File

@ -1,87 +0,0 @@
Index: kinit/klauncher.cpp
===================================================================
--- kinit/klauncher.cpp (revision 918402)
+++ kinit/klauncher.cpp (revision 918403)
@@ -167,7 +167,7 @@
KLauncher::KLauncher(int _kdeinitSocket)
: QObject(0),
- kdeinitSocket(_kdeinitSocket), dontBlockReading(false)
+ kdeinitSocket(_kdeinitSocket)
{
#ifdef Q_WS_X11
mCached_dpy = NULL;
@@ -276,8 +276,24 @@
{
ssize_t result;
int bytes_left = len;
- while ( bytes_left > 0)
- {
+ while (bytes_left > 0) {
+ // in case we get a request to start an application and data arrive
+ // to kdeinitSocket at the same time, requestStart() will already
+ // call slotKDEInitData(), so we must check there's still something
+ // to read, otherwise this would block
+
+ // Same thing if kdeinit dies without warning.
+
+ fd_set in;
+ timeval tm = { 30, 0 }; // 30 seconds timeout, so we're not stuck in case kdeinit dies on us
+ FD_ZERO ( &in );
+ FD_SET( sock, &in );
+ select( sock + 1, &in, 0, 0, &tm );
+ if( !FD_ISSET( sock, &in )) {
+ kDebug(7016) << "read_socket" << sock << "nothing to read, kdeinit4 must be dead";
+ return -1;
+ }
+
result = read(sock, buffer, bytes_left);
if (result > 0)
{
@@ -298,21 +314,7 @@
{
klauncher_header request_header;
QByteArray requestData;
- if( dontBlockReading )
- {
- // in case we get a request to start an application and data arrive
- // to kdeinitSocket at the same time, requestStart() will already
- // call slotKDEInitData(), so we must check there's still something
- // to read, otherwise this would block
- fd_set in;
- timeval tm = { 0, 0 };
- FD_ZERO ( &in );
- FD_SET( kdeinitSocket, &in );
- select( kdeinitSocket + 1, &in, 0, 0, &tm );
- if( !FD_ISSET( kdeinitSocket, &in ))
- return;
- }
- dontBlockReading = false;
+
int result = read_socket(kdeinitSocket, (char *) &request_header,
sizeof( request_header));
if (result == -1)
@@ -647,17 +649,21 @@
request_header.cmd = LAUNCHER_EXEC_NEW;
#endif
request_header.arg_length = requestData.length();
+
+#ifdef KLAUNCHER_VERBOSE_OUTPUT
+ kDebug(7016) << "Asking kdeinit to start" << request->name << request->arg_list
+ << "cmd=" << commandToString(request_header.cmd);
+#endif
+
write(kdeinitSocket, &request_header, sizeof(request_header));
write(kdeinitSocket, requestData.data(), requestData.length());
// Wait for pid to return.
lastRequest = request;
- dontBlockReading = false;
do {
slotKDEInitData( kdeinitSocket );
}
while (lastRequest != 0);
- dontBlockReading = true;
#endif
}

View File

@ -1,129 +0,0 @@
Index: kinit/klauncher.cpp
===================================================================
--- kinit/klauncher.cpp (revision 918653)
+++ kinit/klauncher.cpp (revision 918654)
@@ -58,6 +58,9 @@
// #define KLAUNCHER_VERBOSE_OUTPUT
+static const char* const s_DBusStartupTypeToString[] =
+ { "DBusNone", "DBusUnique", "DBusMulti", "DBusWait", "ERROR" };
+
using namespace KIO;
IdleSlave::IdleSlave(QObject *parent)
@@ -393,15 +396,19 @@
if (request->pid == pid)
{
if (request->dbus_startup_type == KService::DBusWait)
- request->status = KLaunchRequest::Done;
+ request->status = KLaunchRequest::Done;
else if ((request->dbus_startup_type == KService::DBusUnique)
- && QDBusConnection::sessionBus().interface()->isServiceRegistered(request->dbus_name))
- request->status = KLaunchRequest::Running;
- else
- request->status = KLaunchRequest::Error;
+ && QDBusConnection::sessionBus().interface()->isServiceRegistered(request->dbus_name)) {
+ request->status = KLaunchRequest::Running;
#ifdef KLAUNCHER_VERBOSE_OUTPUT
- kDebug(7016) << pid << "died, requestDone. status=" << request->status;
+ kDebug(7016) << pid << "running as a unique app";
#endif
+ } else {
+ request->status = KLaunchRequest::Error;
+#ifdef KLAUNCHER_VERBOSE_OUTPUT
+ kDebug(7016) << pid << "died, requestDone. status=" << request->status;
+#endif
+ }
requestDone(request);
return;
}
@@ -446,19 +453,29 @@
if (request->status != KLaunchRequest::Launching)
continue;
+#ifdef KLAUNCHER_VERBOSE_OUTPUT
+ kDebug(7016) << "had pending request" << request->name << s_DBusStartupTypeToString[request->dbus_startup_type] << "dbus_name" << request->dbus_name << request->tolerant_dbus_name;
+#endif
// For unique services check the requested service name first
- if ((request->dbus_startup_type == KService::DBusUnique) &&
- ((appId == request->dbus_name) ||
- QDBusConnection::sessionBus().interface()->isServiceRegistered(request->dbus_name)))
- {
- request->status = KLaunchRequest::Running;
- requestDone(request);
- continue;
+ if (request->dbus_startup_type == KService::DBusUnique) {
+ if ((appId == request->dbus_name) || // just started
+ QDBusConnection::sessionBus().interface()->isServiceRegistered(request->dbus_name)) { // was already running
+ request->status = KLaunchRequest::Running;
+#ifdef KLAUNCHER_VERBOSE_OUTPUT
+ kDebug(7016) << "OK, unique app" << request->dbus_name << "is running";
+#endif
+ requestDone(request);
+ continue;
+ } else {
+#ifdef KLAUNCHER_VERBOSE_OUTPUT
+ kDebug(7016) << "unique app" << request->dbus_name << "not running yet";
+#endif
+ }
}
- const QString rAppId = request->dbus_name;
+ const QString rAppId = !request->tolerant_dbus_name.isEmpty() ? request->tolerant_dbus_name : request->dbus_name;
#ifdef KLAUNCHER_VERBOSE_OUTPUT
- kDebug(7016) << "had pending request" << rAppId;
+ //kDebug(7016) << "using" << rAppId << "for matching";
#endif
if (rAppId.isEmpty())
continue;
@@ -818,11 +835,18 @@
request->dbus_name = v.toString().toUtf8();
}
if (request->dbus_name.isEmpty()) {
- request->dbus_name = "*." + QFile::encodeName(KRun::binaryName(service->exec(), true));
+ const QString binName = KRun::binaryName(service->exec(), true);
+ request->dbus_name = "org.kde." + binName;
+ request->tolerant_dbus_name = "*." + binName;
}
}
}
+#ifdef KLAUNCHER_VERBOSE_OUTPUT
+ kDebug(7016) << "name=" << request->name << "dbus_name=" << request->dbus_name
+ << "startup type=" << s_DBusStartupTypeToString[request->dbus_startup_type];
+#endif
+
request->pid = 0;
request->envs = envs;
send_service_startup_info( request, service, startup_id, envs );
@@ -938,7 +962,7 @@
request->arg_list.append(arg.toLocal8Bit());
}
- request->name = app.toLocal8Bit();
+ request->name = app;
if (wait)
request->dbus_startup_type = KService::DBusWait;
@@ -1113,7 +1137,7 @@
}
if (mSlaveValgrind == arg1)
{
- arg_list.prepend(QFile::encodeName(KLibLoader::findLibrary(name.toLocal8Bit())));
+ arg_list.prepend(QFile::encodeName(KLibLoader::findLibrary(name)));
arg_list.prepend(QFile::encodeName(KStandardDirs::locate("exe", "kioslave")));
name = "valgrind";
if (!mSlaveValgrindSkin.isEmpty()) {
Index: kinit/klauncher.h
===================================================================
--- kinit/klauncher.h (revision 918653)
+++ kinit/klauncher.h (revision 918654)
@@ -87,6 +87,7 @@
QString name;
QStringList arg_list;
QString dbus_name;
+ QString tolerant_dbus_name;
enum status_t { Init = 0, Launching, Running, Error, Done };
pid_t pid;
status_t status;

View File

@ -1,6 +1,6 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.2.0
Release: 15%{?dist}
Version: 4.2.1
Release: 1%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -81,23 +81,13 @@ Patch22: kdelibs-4.1.96-cmake.patch
Patch23: kdelibs-4.2.0-gcc44-workaround.patch
# disable strict aliasing in kjs/dtoa.cpp (GCC 4.4 x86_64 crash) (#485968)
Patch24: kdelibs-4.2.0-kjs-gcc44-crash.patch
Patch25: kdelibs-4.2.0-gcc44-misc.patch
# upstream
# 4.3 branch
Patch101: kdelibs-4.1.96-AllowExternalPaths.patch
# 4.2 branch
Patch110: kdelibs-4.2.1-kde#917170.patch
Patch111: kdelibs-4.2.1-kde#918403.patch
Patch112: kdelibs-4.2.1-kde#918654.patch
Patch113: kdelibs-4.2.0-kded-kdirwatch.patch
# http://bugs.kde.org/179934
Patch114: kdelibs-4.2.0-ssl_proxy.patch
Patch115: kdelibs-4.2.0-kded.patch
Patch116: kdelibs-4.2.0-plasma-qt45.patch
# fix crash in ~KMainWindow triggered by sending messages in KNode (kde#182322)
# http://websvn.kde.org/?view=rev&revision=918169
Patch117: kdelibs-4.2.0-kmainwindow-crash.patch
# 4.3 branch
Patch200: kdelibs-4.1.96-AllowExternalPaths.patch
BuildRequires: qt4-devel >= 4.4.0
# qt4%{_?_isa} isn't provided yet -- Rex
@ -140,7 +130,7 @@ BuildRequires: strigi-devel >= 0.6.3
BuildRequires: zlib-devel
BuildRequires: libutempter-devel
# extra X deps (seemingly needed and/or checked-for by most kde4 buildscripts)
%define x_deps libXcomposite-devel libXdamage-devel libxkbfile-devel libXpm-devel libXScrnSaver-devel libXtst-devel libXv-devel libXxf86misc-devel
%define x_deps libSM-devel libXcomposite-devel libXdamage-devel libxkbfile-devel libXpm-devel libXScrnSaver-devel libXtst-devel libXv-devel libXxf86misc-devel
%{?x_deps:BuildRequires: %{x_deps}}
BuildRequires: openssh-clients
BuildRequires: subversion
@ -227,17 +217,13 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
%patch22 -p1 -b .kdepimlibs-cmake
%patch23 -p1 -b .gcc44
%patch24 -p1 -b .kjs-gcc44-crash
%patch25 -p1 -b .gcc44-misc
# upstream patches
%patch101 -p1 -b .AllowExternalPaths
%patch110 -p0 -b .kde#917170
%patch111 -p0 -b .kde#918403
%patch112 -p0 -b .kde#918654
%patch113 -p4 -b .kde#182472
%patch114 -p3 -b .kde#179934
%patch115 -p0 -b .kded
%patch116 -p1 -b .qt45
%patch117 -p0 -b .kmainwindow-crash
# 4.2
# 4.3
%patch200 -p1 -b .AllowExternalPaths
%build
@ -370,9 +356,21 @@ rm -rf %{buildroot}
%exclude %{_kde4_configdir}/kdebugrc
%exclude %{_kde4_configdir}/ui/ui_standards.rc
%exclude %{_kde4_appsdir}/kdeui
%exclude %{_kde4_configdir}/colors/40.colors
%exclude %{_kde4_configdir}/colors/Rainbow.colors
%exclude %{_kde4_configdir}/colors/Royal.colors
%exclude %{_kde4_configdir}/colors/Web.colors
%exclude %{_kde4_configdir}/ksslcalist
%exclude %{_kde4_bindir}/preparetips
%files common
%defattr(-,root,root,-)
%{_kde4_configdir}/colors/40.colors
%{_kde4_configdir}/colors/Rainbow.colors
%{_kde4_configdir}/colors/Royal.colors
%{_kde4_configdir}/colors/Web.colors
%{_kde4_configdir}/ksslcalist
%{_kde4_bindir}/preparetips
%{_kde4_configdir}/kdebug.areas
%{_kde4_configdir}/kdebugrc
%dir %{_kde4_configdir}/ui
@ -403,6 +401,15 @@ rm -rf %{buildroot}
%changelog
* Fri Feb 27 2009 Lukáš Tinkl <ltinkl@redhat.com> - 4.2.1-1
- 4.2.1
* Thu Feb 26 2009 Than Ngo <than@redhat.com> 4.2.0-17
- fix build issue against gcc44
* Wed Feb 25 2009 Than Ngo <than@redhat.com> - 4.2.0-16
- fix files conflicts with 3.5.x
* Tue Feb 24 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.2.0-15
- fix crash in ~KMainWindow triggered by sending messages in KNode (kde#182322)

View File

@ -1 +1 @@
2d830a922195fefe6e073111850247ac kdelibs-4.2.0.tar.bz2
3ccc094df33db9d61f5ad065b9b857ac kdelibs-4.2.1.tar.bz2