Hello community,
here is the log from the commit of package kdevplatform4
checked in at Sat Aug 18 12:12:19 CEST 2007.
--------
--- KDE/kdevplatform4/kdevplatform4.changes 2007-08-16 20:31:58.000000000 +0200
+++ /mounts/work_src_done/STABLE/kdevplatform4/kdevplatform4.changes 2007-08-18 06:42:39.000000000 +0200
@@ -1,0 +2,5 @@
+Sat Aug 18 06:42:36 CEST 2007 - stbinner@suse.de
+
+- update to 3.92.0.svn701364
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdevplatform4.spec ++++++
--- /var/tmp/diff_new_pack.B25285/_old 2007-08-18 12:06:51.000000000 +0200
+++ /var/tmp/diff_new_pack.B25285/_new 2007-08-18 12:06:51.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kdevplatform4 (Version 3.92.0.svn700903)
+# spec file for package kdevplatform4 (Version 3.92.0.svn701364)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -15,7 +15,7 @@
Group: Development/Tools/IDE
Summary: Base Package for Integrated Development Environments
URL: http://www.kdevelop.org
-Version: 3.92.0.svn700903
+Version: 3.92.0.svn701364
Release: 1
Source0: kdevplatform.tar.bz2
Source1: _upstream
@@ -170,6 +170,8 @@
/usr/share/kde4/services/kcm_kdev_envsettings.desktop
%changelog
+* Sat Aug 18 2007 - stbinner@suse.de
+- update to 3.92.0.svn701364
* Thu Aug 16 2007 - stbinner@suse.de
- update to 3.92.0.svn700903
* Thu Aug 09 2007 - stbinner@suse.de
++++++ kdevplatform.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/editor/documentrangeobject.h new/kdevplatform/editor/documentrangeobject.h
--- old/kdevplatform/editor/documentrangeobject.h 2007-08-09 17:36:38.000000000 +0200
+++ new/kdevplatform/editor/documentrangeobject.h 2007-08-17 11:58:57.000000000 +0200
@@ -56,6 +56,7 @@
const KTextEditor::Range textRange() const;
const DocumentRange textDocRange() const;
KTextEditor::Range* textRangePtr() const;
+ ///If this document's range is a SmartRange, returns it. Else 0.
KTextEditor::SmartRange* smartRange() const;
RangeOwning ownsRange() const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/backgroundparser/backgroundparser.cpp new/kdevplatform/language/backgroundparser/backgroundparser.cpp
--- old/kdevplatform/language/backgroundparser/backgroundparser.cpp 2007-08-06 00:23:56.000000000 +0200
+++ new/kdevplatform/language/backgroundparser/backgroundparser.cpp 2007-08-17 13:37:01.000000000 +0200
@@ -301,6 +301,9 @@
if (ParseJob* parseJob = qobject_cast(job)) {
kDebug(9505) << "BackgroundParser: parsed" << parseJob->document();
+
+ emit parseJobFinished(parseJob);
+
d->m_parseJobs.remove(parseJob->document());
parseJob->setBackgroundParser(0);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/backgroundparser/backgroundparser.h new/kdevplatform/language/backgroundparser/backgroundparser.h
--- old/kdevplatform/language/backgroundparser/backgroundparser.h 2007-07-25 18:27:23.000000000 +0200
+++ new/kdevplatform/language/backgroundparser/backgroundparser.h 2007-08-17 13:37:01.000000000 +0200
@@ -80,6 +80,10 @@
*/
ParserDependencyPolicy* dependencyPolicy() const;
+signals:
+ ///Emitted whenever a document parse-job has finished. The job contains the du-chain(if one was created) etc.
+ void parseJobFinished(KDevelop::ParseJob* job);
+
public Q_SLOTS:
/**
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/backgroundparser/parsejob.cpp new/kdevplatform/language/backgroundparser/parsejob.cpp
--- old/kdevplatform/language/backgroundparser/parsejob.cpp 2007-07-25 18:27:23.000000000 +0200
+++ new/kdevplatform/language/backgroundparser/parsejob.cpp 2007-08-17 13:37:01.000000000 +0200
@@ -47,8 +47,12 @@
namespace KDevelop
{
-class ParseJobPrivate
+struct ParseJobPrivate
{
+ ParseJobPrivate() : m_duContext(0) {
+ }
+
+ TopDUContext* m_duContext;
};
ParseJob::ParseJob( const KUrl &url,
@@ -75,6 +79,7 @@
smart->releaseRevision(m_revisionToken);
}
}
+ delete d;
}
KUrl ParseJob::document() const
@@ -87,6 +92,17 @@
return !m_aborted;
}
+void ParseJob::setDuChain(KDevelop::TopDUContext* duChain)
+{
+ d->m_duContext = duChain;
+}
+
+TopDUContext* ParseJob::duChain() const
+{
+ return d->m_duContext;
+}
+
+
QString ParseJob::errorMessage() const
{
return m_errorMessage;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/backgroundparser/parsejob.h new/kdevplatform/language/backgroundparser/parsejob.h
--- old/kdevplatform/language/backgroundparser/parsejob.h 2007-07-25 18:27:23.000000000 +0200
+++ new/kdevplatform/language/backgroundparser/parsejob.h 2007-08-17 13:37:01.000000000 +0200
@@ -32,6 +32,7 @@
{
class BackgroundParser;
+class TopDUContext;
/**
* The base class for background parser jobs.
@@ -66,6 +67,11 @@
void setErrorMessage(const QString& message);
QString errorMessage() const;
+ /// Sets the du-context that was created by this parse-job
+ virtual void setDuChain(TopDUContext* duChain);
+ /// Returns the set du-context, or zero of none was set.
+ virtual TopDUContext* duChain() const;
+
/// Overriden to allow jobs to determine if they've been requested to abort
virtual void requestAbort();
/// Determine if the job has been requested to abort
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/duchain/ducontext.cpp new/kdevplatform/language/duchain/ducontext.cpp
--- old/kdevplatform/language/duchain/ducontext.cpp 2007-08-16 18:54:24.000000000 +0200
+++ new/kdevplatform/language/duchain/ducontext.cpp 2007-08-17 01:41:42.000000000 +0200
@@ -541,14 +541,14 @@
return ret;
}
-QHash DUContext::allDeclarations(const KTextEditor::Cursor& position) const
+QList< QPair > DUContext::allDeclarations(const KTextEditor::Cursor& position, bool searchInParents) const
{
ENSURE_CAN_READ
- QHash ret;
+ QList< QPair > ret;
// Iterate back up the chain
- mergeDeclarationsInternal(ret, position);
+ mergeDeclarationsInternal(ret, type() == DUContext::Class ? KTextEditor::Cursor::invalid() : position, searchInParents);
return ret;
}
@@ -561,11 +561,14 @@
return d->m_localDeclarations;
}
-void DUContext::mergeDeclarationsInternal(QHash& definitions, const KTextEditor::Cursor& position, bool inImportedContext) const
+void DUContext::mergeDeclarationsInternal(QList< QPair >& definitions, const KTextEditor::Cursor& position, bool searchInParents, int currentDepth) const
{
+ if( type() == DUContext::Namespace || type() == DUContext::Global && currentDepth < 1000 )
+ currentDepth += 1000;
+
foreach (Declaration* definition, localDeclarations())
- if (!definitions.contains(definition->qualifiedIdentifier()) && (inImportedContext || definition->textRange().start() <= position))
- definitions.insert(definition->qualifiedIdentifier(), definition);
+ if ( (!position.isValid() || definition->textRange().start() <= position) )
+ definitions << qMakePair(definition, currentDepth);
QListIterator<DUContextPointer> it = d->m_importedParentContexts;
it.toBack();
@@ -576,11 +579,11 @@
if( !context )
break;
- context->mergeDeclarationsInternal(definitions, position, true);
+ context->mergeDeclarationsInternal(definitions, KTextEditor::Cursor::invalid(), false, currentDepth+1);
}
- if (!inImportedContext && parentContext()) ///In classes the position does not play a role(@todo this is language-dependent)
- parentContext()->mergeDeclarationsInternal(definitions, parentContext()->type() == DUContext::Class ? parentContext()->textRange().end() : position);
+ if (searchInParents && parentContext()) ///Only respect the position if the parent-context is not a class(@todo this is language-dependent)
+ parentContext()->mergeDeclarationsInternal(definitions, (parentContext()->type() != DUContext::Class) ? position : KTextEditor::Cursor::invalid(), true, currentDepth+1);
}
void DUContext::deleteLocalDeclarations()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/duchain/ducontext.h new/kdevplatform/language/duchain/ducontext.h
--- old/kdevplatform/language/duchain/ducontext.h 2007-08-16 18:54:24.000000000 +0200
+++ new/kdevplatform/language/duchain/ducontext.h 2007-08-17 11:58:57.000000000 +0200
@@ -94,7 +94,8 @@
OnlyContainerTypes = 2, //Not implemented yet
DontSearchInParent = 4, //IF this flag is set, findDeclarations(..) will not search for the identifier in parent-contexts(which does not include imported parent-contexts)
NoUndefinedTemplateParams = 8, //For languages that support templates(like C++). If this is set, the search should fail as soon as undefined template-parameters are involved.
- LanguageSpecificFlag1 = 16 //This is a flag that can be used to control language-specific parts of the search in overridden functions(has no direct function in the du-chain)
+ LanguageSpecificFlag1 = 16, //This is a flag that can be used to control language-specific parts of the search in overridden functions(has no direct function in the du-chain)
+ NoFiltering = 32 //Should be set when no filtering at all is wished, not even filtering that is natural for the underlying language(For example in C++, constructors are filtered out be default)
};
Q_DECLARE_FLAGS(SearchFlags, SearchFlag)
@@ -309,17 +310,18 @@
QList findContexts(ContextType contextType, const QualifiedIdentifier& identifier, const KTextEditor::Cursor& position = KTextEditor::Cursor::invalid(), SearchFlags flags = NoSearchFlags) const;
/**
- * Return a list of definitions for a given cursor \a position in a given \a url.
+ * Return a list of all reachable declarations for a given cursor \a position in a given \a url.
*
* \param location the text position to search for
- * \param parent the parent context to search from (this is mostly an internal detail, but if you only
- * want to search in a subbranch of the chain, you may specify the parent here)
+ * \param searchInParents should declarations from parent-contexts be listed? If false, only declarations from this and imported contexts will be returned.
*
+ * The returned declarations are paired together with their inheritance-depth, which is the count of steps
+ * to into other contexts that were needed to find the declaration. Declarations reached through a namespace- or global-context
+ * are offsetted by 1000.
+ *
* \returns the requested definitions, if any were active at that location.
- *
- * \warning this may return declarations which are not in this tree, you may need to lock them too...
*/
- QHash allDeclarations(const KTextEditor::Cursor& position) const;
+ QList< QPair > allDeclarations(const KTextEditor::Cursor& position, bool searchInParents=true) const;
/**
* Return all declarations in this context that have the given \a identifier, without any filtering.
@@ -369,9 +371,9 @@
* */
virtual bool foundEnough( const QList& decls ) const;
/**
- * Merges definitions up all branches of the definition-use chain into one hash.
+ * Merges definitions and their inheritance-depth up all branches of the definition-use chain into one hash.
*/
- void mergeDeclarationsInternal(QHash& definitions, const KTextEditor::Cursor& position, bool inImportedContext = false) const;
+ virtual void mergeDeclarationsInternal(QList< QPair >& definitions, const KTextEditor::Cursor& position, bool searchInParents = true, int currentDepth = 0) const;
/// Logic for calculating the fully qualified scope name
QualifiedIdentifier scopeIdentifierInternal(DUContext* context) const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/duchain/dumpdotgraph.cpp new/kdevplatform/language/duchain/dumpdotgraph.cpp
--- old/kdevplatform/language/duchain/dumpdotgraph.cpp 2007-08-16 18:54:24.000000000 +0200
+++ new/kdevplatform/language/duchain/dumpdotgraph.cpp 2007-08-17 01:34:43.000000000 +0200
@@ -86,7 +86,7 @@
m_hadObjects[def] = true;
- stream << shortLabel(def) << "[shape=regular,label=\"" << (def->declaration() ? def->declaration()->toString() : QString("no declaration")) << " "<< rangeToString(def->textRange()) << "\"];\n";
+ stream << shortLabel(def) << "[shape=regular,color=yellow,label=\"" << (def->declaration() ? def->declaration()->toString() : QString("no declaration")) << " "<< rangeToString(def->textRange()) << "\"];\n";
stream << shortLabel(def->context()) << " -> " << shortLabel(def) << ";\n";
if( def->declaration() ) {
stream << shortLabel(def) << " -> " << shortLabel(def->declaration()) << "[label=\"defines\",color=green];\n";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/duchain/smartconverter.cpp new/kdevplatform/language/duchain/smartconverter.cpp
--- old/kdevplatform/language/duchain/smartconverter.cpp 2007-08-15 20:50:51.000000000 +0200
+++ new/kdevplatform/language/duchain/smartconverter.cpp 2007-08-17 11:58:57.000000000 +0200
@@ -47,19 +47,22 @@
foreach (Declaration* dec, context->localDeclarations()) {
dec->setTextRange(m_editor->createRange(dec->textRange()));
- m_hl->highlightDeclaration(dec);
+ if( m_hl )
+ m_hl->highlightDeclaration(dec);
m_editor->exitCurrentRange();
}
foreach (Definition* def, context->localDefinitions()) {
def->setTextRange(m_editor->createRange(def->textRange()));
- m_hl->highlightDefinition(def);
+ if( m_hl )
+ m_hl->highlightDefinition(def);
m_editor->exitCurrentRange();
}
foreach (Use* use, context->uses()) {
use->setTextRange(m_editor->createRange(use->textRange()));
- m_hl->highlightUse(use);
+ if( m_hl )
+ m_hl->highlightUse(use);
m_editor->exitCurrentRange();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/language/duchain/stringhelpers.cpp new/kdevplatform/language/duchain/stringhelpers.cpp
--- old/kdevplatform/language/duchain/stringhelpers.cpp 2007-07-30 18:14:49.000000000 +0200
+++ new/kdevplatform/language/duchain/stringhelpers.cpp 2007-08-16 22:16:04.000000000 +0200
@@ -161,6 +161,11 @@
d->m_prefix = d->m_source.mid( offset, parenBegin - offset );
d->m_cur = parenBegin + 1;
d->m_curEnd = d->next();
+ if( d->m_curEnd == d->m_source.length() ) {
+ //The paren was not closed. It might be an identifier like "operator<", so count everything as prefix.
+ d->m_prefix = d->m_source.mid(offset);
+ d->m_curEnd = d->m_end = d->m_cur = d->m_source.length();
+ }
} else {
//We have neither found an ending-character, nor an opening-paren, so take the whole input and end
d->m_prefix = d->m_source.mid(offset);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/plugins/cvs/diffoptionsdialog.h new/kdevplatform/plugins/cvs/diffoptionsdialog.h
--- old/kdevplatform/plugins/cvs/diffoptionsdialog.h 2007-07-25 18:27:23.000000000 +0200
+++ new/kdevplatform/plugins/cvs/diffoptionsdialog.h 2007-08-17 06:44:20.000000000 +0200
@@ -30,12 +30,12 @@
/**
* @return The first diffing revision, branchname or tag
- * @note Can also be QString::null if the user requested a diff agains BASE
+ * @note Can also be QString() if the user requested a diff agains BASE
*/
QString revA() const;
/**
* @return The second diffing revision, branchname or tag
- * @note Can also be QString::null if the user requested a diff agains a single revision
+ * @note Can also be QString() if the user requested a diff agains a single revision
*/
QString revB() const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/plugins/duchainviewer/duchainmodel.cpp new/kdevplatform/plugins/duchainviewer/duchainmodel.cpp
--- old/kdevplatform/plugins/duchainviewer/duchainmodel.cpp 2007-08-16 11:15:56.000000000 +0200
+++ new/kdevplatform/plugins/duchainviewer/duchainmodel.cpp 2007-08-17 13:37:01.000000000 +0200
@@ -27,6 +27,10 @@
#include
#include "idocument.h"
+#include "icore.h"
+#include "ilanguagecontroller.h"
+#include "backgroundparser/backgroundparser.h"
+#include "backgroundparser/parsejob.h"
#include "duchainview_part.h"
#include "dumpdotgraph.h"
@@ -55,18 +59,37 @@
{
DUChainWriteLocker writeLock(DUChain::lock());
DUChain::self()->addObserver(this);
+ connect( part()->core()->languageController()->backgroundParser(), SIGNAL(parseJobFinished(KDevelop::ParseJob*)), this, SLOT(parseJobFinished(KDevelop::ParseJob*)));
+}
+
+DUChainViewPart* DUChainModel::part() const {
+ return qobject_cast(QObject::parent());
}
DUChainModel::~DUChainModel()
{
}
+void DUChainModel::parseJobFinished(KDevelop::ParseJob* job)
+{
+ QMutexLocker lock(&m_mutex);
+ if( job->document() == m_document && job->duChain() ) {
+ lock.unlock();
+ setTopContext(job->duChain());
+ }
+
+}
+
void DUChainModel::documentActivated(KDevelop::IDocument* document)
{
if (document) {
TopDUContext* chain = DUChain::self()->chainForDocument(document->url());
if (chain)
setTopContext(chain);
+ else {
+ QMutexLocker lock(&m_mutex);
+ m_document = document->url();
+ }
}
}
@@ -75,6 +98,11 @@
DUChainReadLocker readLock(DUChain::lock());
QMutexLocker lock(&m_mutex);
+ if( context )
+ m_document = context->url();
+ else
+ m_document = KUrl();
+
if (m_chain != context)
m_chain = context;
@@ -389,6 +417,12 @@
m_objectLists.remove(context);
// fallthrough
}
+ if( context == m_chain ) {
+ //Top-context was deleted
+ setTopContext(0);
+ return;
+ }
+
case Change: {
int index = list->indexOf(relatedObject);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/plugins/duchainviewer/duchainmodel.h new/kdevplatform/plugins/duchainviewer/duchainmodel.h
--- old/kdevplatform/plugins/duchainviewer/duchainmodel.h 2007-08-14 17:08:46.000000000 +0200
+++ new/kdevplatform/plugins/duchainviewer/duchainmodel.h 2007-08-17 13:37:01.000000000 +0200
@@ -26,6 +26,7 @@
#include
#include
+#include
#include "duchainbase.h"
#include "duchainobserver.h"
@@ -35,6 +36,7 @@
namespace KDevelop {
class TopDUContext;
class IDocument;
+ class ParseJob;
}
class ProxyObject : public KDevelop::DUChainBase
@@ -58,6 +60,7 @@
public Q_SLOTS:
void documentActivated(KDevelop::IDocument* document);
+ void parseJobFinished(KDevelop::ParseJob* job);
public:
virtual int columnCount(const QModelIndex & parent = QModelIndex()) const;
@@ -77,6 +80,8 @@
void doubleClicked ( const QModelIndex & index );
private:
+ DUChainViewPart* part() const;
+
KDevelop::DUChainBase* objectForIndex(const QModelIndex& index) const;
int findInsertIndex(QListKDevelop::DUChainBase*& list, KDevelop::DUChainBase* object) const;
@@ -125,6 +130,7 @@
QListKDevelop::DUChainBase** childItems(KDevelop::DUChainBase* parent) const;
KDevelop::TopDUContext* m_chain;
+ KUrl m_document;
mutable QMutex m_mutex;
mutable QHashKDevelop::DUChainBase** > m_objectLists;
mutable QHash m_modelRow;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/plugins/teamwork/lib/libdiff2/komparemodellist.cpp new/kdevplatform/plugins/teamwork/lib/libdiff2/komparemodellist.cpp
--- old/kdevplatform/plugins/teamwork/lib/libdiff2/komparemodellist.cpp 2007-08-06 00:23:56.000000000 +0200
+++ new/kdevplatform/plugins/teamwork/lib/libdiff2/komparemodellist.cpp 2007-08-17 06:44:20.000000000 +0200
@@ -895,7 +895,7 @@
if ( fi.isDir() )
{ // is a dir
kDebug(9500) << "Blend Dir";
-// QDir dir( localURL, QString::null, QDir::Name|QDir::DirsFirst, QDir::TypeMask );
+// QDir dir( localURL, QString(), QDir::Name|QDir::DirsFirst, QDir::TypeMask );
DiffModelListIterator modelIt = m_models->begin();
DiffModelListIterator mEnd = m_models->end();
for ( ; modelIt != mEnd; ++modelIt )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdevplatform/shell/projectcontroller.cpp new/kdevplatform/shell/projectcontroller.cpp
--- old/kdevplatform/shell/projectcontroller.cpp 2007-08-06 00:30:58.000000000 +0200
+++ new/kdevplatform/shell/projectcontroller.cpp 2007-08-17 06:44:20.000000000 +0200
@@ -311,7 +311,7 @@
// save the the project to open it automatically on startup if needed
// d->m_lastProject = d->m_globalFile;
-// d->m_name = QString::null;
+// d->m_name = QString();
// d->m_localFile.clear();
// d->m_globalFile.clear();
// d->m_projectsDir.clear();
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org