From d498e93468a9ffe81e8471defe26cc7ee1ed6cf4 Mon Sep 17 00:00:00 2001 From: James Hogan Date: Tue, 23 Dec 2008 13:55:03 +0000 Subject: [PATCH] Fix KwBibleModule::fillPassage to provide correct manager id to KwBiblePassage object --- kworship/bible/KwBibleModule.cpp | 2 +- kworship/bible/KwBibleModule.h | 3 +++ kworship/bible/KwBibleModuleBibleGateway.cpp | 5 +++++ kworship/bible/KwBibleModuleBibleGateway.h | 3 +++ kworship/bible/KwBibleModuleSword.cpp | 5 +++++ kworship/bible/KwBibleModuleSword.h | 3 +++ 6 files changed, 20 insertions(+), 1 deletion(-) diff --git a/kworship/bible/KwBibleModule.cpp b/kworship/bible/KwBibleModule.cpp index c7d66c6..2bc71b0 100644 --- a/kworship/bible/KwBibleModule.cpp +++ b/kworship/bible/KwBibleModule.cpp @@ -310,7 +310,7 @@ bool KwBibleModule::fillPassage(const Key& key, KwBiblePassage* outPassage) range.end.verse = range.start.verse; } - outPassage->setSource("MGR", name(), m_rightToLeft); + outPassage->setSource(managerId(), name(), m_rightToLeft); outPassage->initBooks(range.start.book, 1+range.end.book-range.start.book); for (int book = range.start.book; book <= range.end.book; ++book) { diff --git a/kworship/bible/KwBibleModule.h b/kworship/bible/KwBibleModule.h index e4f5c99..a3948f9 100644 --- a/kworship/bible/KwBibleModule.h +++ b/kworship/bible/KwBibleModule.h @@ -104,6 +104,9 @@ class KwBibleModule /// Get the description of the module. virtual QString description() = 0; + /// Get the id of the manager for this module. + virtual QString managerId() = 0; + /// Is the text right to left? bool isRightToLeft() const; diff --git a/kworship/bible/KwBibleModuleBibleGateway.cpp b/kworship/bible/KwBibleModuleBibleGateway.cpp index b0f32ab..35913c4 100644 --- a/kworship/bible/KwBibleModuleBibleGateway.cpp +++ b/kworship/bible/KwBibleModuleBibleGateway.cpp @@ -146,6 +146,11 @@ QString KwBibleModuleBibleGateway::description() return QString(); } +QString KwBibleModuleBibleGateway::managerId() +{ + return "BibleGateway.com"; +} + int KwBibleModuleBibleGateway::numChapters(int book) { if (book >= 0 && book < m_bookList.size()) diff --git a/kworship/bible/KwBibleModuleBibleGateway.h b/kworship/bible/KwBibleModuleBibleGateway.h index 520d018..80a8609 100644 --- a/kworship/bible/KwBibleModuleBibleGateway.h +++ b/kworship/bible/KwBibleModuleBibleGateway.h @@ -58,6 +58,9 @@ class KwBibleModuleBibleGateway : public KwBibleModule virtual QString description(); // Reimplemented + virtual QString managerId(); + + // Reimplemented virtual int numChapters(int book); // Reimplemented diff --git a/kworship/bible/KwBibleModuleSword.cpp b/kworship/bible/KwBibleModuleSword.cpp index bd6fdaa..4d5122c 100644 --- a/kworship/bible/KwBibleModuleSword.cpp +++ b/kworship/bible/KwBibleModuleSword.cpp @@ -79,6 +79,11 @@ QString KwBibleModuleSword::description() return m_module->Description(); } +QString KwBibleModuleSword::managerId() +{ + return "SWORD"; +} + int KwBibleModuleSword::numChapters(int book) { int testamentBook; diff --git a/kworship/bible/KwBibleModuleSword.h b/kworship/bible/KwBibleModuleSword.h index bd02de3..577ed58 100644 --- a/kworship/bible/KwBibleModuleSword.h +++ b/kworship/bible/KwBibleModuleSword.h @@ -59,6 +59,9 @@ class KwBibleModuleSword : public KwBibleModule virtual QString description(); // Reimplemented + virtual QString managerId(); + + // Reimplemented virtual int numChapters(int book); // Reimplemented -- 2.11.4.GIT