[PATCH] Skip files ending in .debug when loading plugins

alvinhochun+krita at gmail.com alvinhochun+krita at gmail.com
Sun Sep 25 18:25:29 UTC 2016


From: Alvin Wong <alvinhochun at gmail.com>

Skip files ending in .debug when loading plugins. This is to support
separating debug info from the executable files and not polluting the gdb
output with tons of "xxx.debug has no json" messages.
---
 libs/koplugin/KoJsonTrader.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/koplugin/KoJsonTrader.cpp b/libs/koplugin/KoJsonTrader.cpp
index 99c07b9..b6a655b 100644
--- a/libs/koplugin/KoJsonTrader.cpp
+++ b/libs/koplugin/KoJsonTrader.cpp
@@ -114,7 +114,7 @@ QList<QPluginLoader *> KoJsonTrader::query(const QString &servicetype, const QSt
     QDirIterator dirIter(m_pluginPath, QDirIterator::Subdirectories);
     while (dirIter.hasNext()) {
         dirIter.next();
-        if (dirIter.fileInfo().isFile() && dirIter.fileName().startsWith("krita")) {
+        if (dirIter.fileInfo().isFile() && dirIter.fileName().startsWith("krita") && !dirIter.fileName().endsWith(".debug")) {
             debugPlugin << dirIter.fileName();
             QPluginLoader *loader = new QPluginLoader(dirIter.filePath());
             QJsonObject json = loader->metaData().value("MetaData").toObject();
-- 
2.5.0.windows.1



More information about the kimageshop mailing list