From 14192460753772a7b55ad0b0c5b2cd22b1fc81d0 Mon Sep 17 00:00:00 2001
From: "Matt McCormick (thewtex)"
Date: Thu, 14 Aug 2008 04:34:51 -0500
Subject: [PATCH] Ensure that user-defined type tables override system-provided
ones.
This is achieved by requesting only unique file names.
---
kdbg/doc/en/types.html | 10 +++++++---
kdbg/typetable.cpp | 3 ++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/kdbg/doc/en/types.html b/kdbg/doc/en/types.html
index 9e64dc6..ab18a8f 100644
--- a/kdbg/doc/en/types.html
+++ b/kdbg/doc/en/types.html
@@ -9,14 +9,18 @@
Contents
KDbg's Type Table
-KDbg can display the contents of single members of structured types, so
+
KDbg can display a short description of structured types, so
that it is not necessary to expand the variable in the local
variables window or watched expressions window.
The information which member variable is displayed is stored in type
tables. There is generally one type table per shared library.
-KDbg's type tables are located under $prefix/share/apps/kdbg/types.
+
+
KDbg's default type tables are located under $prefix/share/apps/kdbg/types.
+User defined type tables can be placed in ${KDEHOME}/share/apps/kdbg/types, where
+${KDEHOME} is ~/.kde if it is not a defined environment variable.
The file names end with .kdbgtt. Example: The type table for libqt.so
-is named qt.kdbgtt.
+is named qt.kdbgtt.
+User defined type tables override the type tables provided by the system.
A type table file obeys the regular KDE configuration file syntax. The
file has the following groups:
diff --git a/kdbg/typetable.cpp b/kdbg/typetable.cpp
index df5c065..d1cc49e 100644
--- a/kdbg/typetable.cpp
+++ b/kdbg/typetable.cpp
@@ -37,7 +37,8 @@ void TypeTable::loadTypeTables()
{
typeTablesInited = true;
- const QStringList files = KGlobal::dirs()->findAllResources("types", "*.kdbgtt");
+ const QStringList files = KGlobal::dirs()->findAllResources("types", "*.kdbgtt",
+ false, true);
if (files.isEmpty()) {
TRACE("no type tables found");
--
2.11.4.GIT