Reload the makefile after adding a filter to it on Project Configuration
Tomaz Canabrava
tcanabrava at kde.org
Tue Dec 10 11:57:22 UTC 2013
Hullo.
Yesterday I was annoying Millian to help me a bit on the KDevelop internals
untill I'm fluent enougth to talk to it, and I implemented with his help a
'Filter to Makefile Targets', since one of my projects creates more than 60
of them, it's very important to get rid of them all.
Now I'm trying to make the Makefile be reparsed when the configuration
changes so I don't need to close kdevelop and open it again after a filter
gets added.
I managed to ( following millian instructions ) add two signals to
KDevPlatform::AbstractFileManagerPlugin with the following code:
diff --git a/project/abstractfilemanagerplugin.cpp
b/project/abstractfilemanagerplugin.cpp
index 0536c40..fed801c 100644
--- a/project/abstractfilemanagerplugin.cpp
+++ b/project/abstractfilemanagerplugin.cpp
@@ -154,6 +154,7 @@ void
AbstractFileManagerPlugin::Private::addJobItems(FileManagerListJob* job,
return;
}
+
kDebug(9517) << "reading entries of" << baseItem->url();
// build lists of valid files and folders with relative urls to the
project folder
@@ -212,6 +213,7 @@ void
AbstractFileManagerPlugin::Private::addJobItems(FileManagerListJob* job,
//no need to add this item, but we still want to
recurse into it
job->addSubDir( f );
}
+ emit q->reloadedFolderItem( f );
}
} else if ( ProjectFileItem* f = baseItem->child(j)->file() ) {
// check if this is still a valid file
@@ -224,6 +226,7 @@ void
AbstractFileManagerPlugin::Private::addJobItems(FileManagerListJob* job,
} else {
// this file already exists in the view
files.removeAt( index );
+ emit q->reloadedFileItem( f );
}
}
}
And in the custom makefile, at kdevelop, I plugged those signals and looked
if the file or folder url was 'Makefile' then I'd asked the code to
re-generate the model for it. that didn't worked because no 'Makefile' was
send. Anybody has a hint?
Tomaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20131210/497462c8/attachment.html>
More information about the KDevelop-devel
mailing list