[bt-devel] [ bibletime-Bugs-1595706 ] impossible to build 1.6.1

SourceForge.net noreply at sourceforge.net
Fri Nov 24 11:54:28 MST 2006


Bugs item #1595706, was opened at 2006-11-13 17:17
Message generated for change (Comment added) made by mgruner
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100954&aid=1595706&group_id=954

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: in progress
>Status: Closed
>Resolution: Fixed
Priority: 8
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Martin Gruner (mgruner)
Summary: impossible to build 1.6.1

Initial Comment:
http://pastebin.ca/247493

there is the log! Is there any patch? Is it due to gcc4.1?

regards

----------------------------------------------------------------------

>Comment By: Martin Gruner (mgruner)
Date: 2006-11-24 19:54

Message:
Logged In: YES 
user_id=169722
Originator: NO

I found and fixed this in CVS. Was very bad old leftover code. Thanks for
finding this out. Please either compile CVS (will be 1.6.2 at some point)
or apply the patch below to the 1.6.1 sources (more changes than just this
one, basically patches up to current CVS). Thanks!

Martin


Index: ChangeLog
===================================================================
RCS file: /cvsroot/bibletime/bibletime/ChangeLog,v
retrieving revision 1.128
retrieving revision 1.131
diff -u -3 -p -r1.128 -r1.131
--- ChangeLog   25 Oct 2006 18:49:08 -0000      1.128
+++ ChangeLog   24 Nov 2006 16:22:49 -0000      1.131
@@ -1,3 +1,12 @@
+2006-11-25 Martin Gruner <mgruner at crosswire.org>
+  * Fixed 2 tooltips which were swapped
+
+2006-11-01 Martin Gruner <mgruner at crosswire.org>
+  * Reverted Analyzer Change of 1.6.1 to use StandardAnalyzer again, but
+  without stop words. Whitespace Analyzer did not correctly strip
punctiation,
+  so that hits were missing. Sorry. Search should work as expected now.
+  * Added ability to display Book and Chapter headings
+
 2006-10-25 Martin Gruner <mgruner at crosswire.org>
   * Fixed crash on module uninstallation
   * released BibleTime 1.6.1
Index: bibletime/backend/cchapterdisplay.cpp
===================================================================
RCS file:
/cvsroot/bibletime/bibletime/bibletime/backend/cchapterdisplay.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -p -r1.14 -r1.15
--- bibletime/backend/cchapterdisplay.cpp       14 Feb 2006 13:57:58 -0000
    1.14
+++ bibletime/backend/cchapterdisplay.cpp       1 Nov 2006 11:17:50 -0000 
    1.15
@@ -25,9 +25,7 @@ namespace Rendering {

                CSwordModuleInfo* module = modules.first();

-               if (modules.count() == 1) {
-                       module->module()->setSkipConsecutiveLinks( true );
//skip empty, linked verses
-               }
+               if (modules.count() == 1)
module->module()->setSkipConsecutiveLinks( true ); //skip empty, linked
verses

                CTextRendering::KeyTreeItem::Settings settings;
                settings.keyRenderingFace =
@@ -39,7 +37,7 @@ namespace Rendering {
                QString endKey = startKey;

                //check whether there's an intro we have to include
-               Q_ASSERT(module->type() == CSwordModuleInfo::Bible);
+               Q_ASSERT((module->type() == CSwordModuleInfo::Bible));

                if (module->type() == CSwordModuleInfo::Bible) {
                       
((VerseKey*)(module->module()->getKey()))->Headings(1); //HACK: enable
headings for VerseKeys
@@ -50,17 +48,14 @@ namespace Rendering {
                        CSwordVerseKey k1(module);
                        k1.Headings(true);
                        k1.key(keyName);
-                       k1.Verse(0);

-                       QString raw( k1.rawText() );
+                       if (k1.Chapter() == 1)  k1.Chapter(0); //Chapter
1, start with 0:0, otherwise X:0

-                       //HACK: we need to work around a bug: osis2mod
also puts Preverse titles into the chapter intro (verse 0)
-                       if ((raw.length() == 0) || ((raw.find("<title ")
== 0) && (raw.find("</title>")+8 == int(raw.length())) )) {
-                               k1.Verse(1);
-                       }
+                       k1.Verse(0);

                        startKey = k1.key();
-
+
+                       if (k1.Chapter() == 0) k1.Chapter(1);
                        k1.Verse(bible->verseCount(k1.book(),
k1.Chapter()));
                        endKey = k1.key();
                }
Index: bibletime/backend/centrydisplay.cpp
===================================================================
RCS file:
/cvsroot/bibletime/bibletime/bibletime/backend/centrydisplay.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -p -r1.71 -r1.72
--- bibletime/backend/centrydisplay.cpp 25 Feb 2006 11:38:15 -0000     
1.71
+++ bibletime/backend/centrydisplay.cpp 1 Nov 2006 11:17:50 -0000      
1.72
@@ -36,10 +36,31 @@ const QString CEntryDisplay::text( const
        CDisplayRendering render(displayOptions, filterOptions);

        //no highlighted key and no extra key link in the text
-       CTextRendering::KeyTreeItem::Settings settings(
-               false,
-               CTextRendering::KeyTreeItem::Settings::CompleteShort
-       );
+       CTextRendering::KeyTreeItem::Settings normal_settings(false,
CTextRendering::KeyTreeItem::Settings::CompleteShort);
+       CSwordModuleInfo* module = modules.first();
+       QString result;

-       return render.renderSingleKey(keyName, modules, settings);
+       //in Bibles and Commentaries we need to check if 0:0 and X:0
contain something
+       if (module->type() == CSwordModuleInfo::Bible || module->type() ==
CSwordModuleInfo::Commentary) {
+               ((VerseKey*)(module->module()->getKey()))->Headings(1);
//HACK: enable headings for VerseKeys
+
+               CSwordVerseKey k1(module);
+               k1.Headings(true);
+               k1.key(keyName);
+
+               // don't print the key
+               CTextRendering::KeyTreeItem::Settings
preverse_settings(false, CTextRendering::KeyTreeItem::Settings::NoKey);
+
+               if (k1.Verse() == 1){ //X:1, prepend X:0
+                       if (k1.Chapter() == 1){ //1:1, also prepend 0:0
before that
+                               k1.Chapter(0);
+                               k1.Verse(0);
+                               if ( k1.rawText().length() > 0 )
result.append( render.renderSingleKey(k1.key(), modules, preverse_settings
) );
+                               k1.Chapter(1);
+                       }
+                       k1.Verse(0);
+                       if ( k1.rawText().length() > 0 ) result.append(
render.renderSingleKey(k1.key(), modules, preverse_settings ) );
+               }
+       }
+       return result.append( render.renderSingleKey(keyName, modules,
normal_settings) );
 }
Index: bibletime/backend/cswordkey.h
===================================================================
RCS file: /cvsroot/bibletime/bibletime/bibletime/backend/cswordkey.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -p -r1.26 -r1.27
--- bibletime/backend/cswordkey.h       25 Feb 2006 11:38:15 -0000     
1.26
+++ bibletime/backend/cswordkey.h       30 Oct 2006 19:53:32 -0000     
1.27
@@ -24,7 +24,7 @@ class CSwordModuleInfo;
 /** Base class for all keys.
  * The base class for all Sword based keys.
  * @author The BibleTime team
- * @version $Id: cswordkey.h,v 1.26 2006/02/25 11:38:15 joachim Exp $
+ * @version $Id: cswordkey.h,v 1.27 2006/10/30 19:53:32 mgruner Exp $
  */

 class CSwordKey {
@@ -103,16 +103,15 @@ protected:

 /** The assignment operator for more easy use of the key classes. */
 inline CSwordKey& CSwordKey::operator = ( const QString& newKey ) {
-                                                                         
    key(newKey);
-                                                                         
    return *this;
-                                                                         
    }
-
-                                                                         
    inline CSwordModuleInfo* const CSwordKey::module(CSwordModuleInfo*
const newModule) {
-                                                                         
    if (newModule) {
-                                                                         
    m_module = newModule;
-                                                                         
    }
+       key(newKey);
+       return *this;
+}
+
+inline CSwordModuleInfo* const CSwordKey::module(CSwordModuleInfo* const
newModule) {
+       if (newModule) {
+               m_module = newModule;
+       }
+       return m_module;
+}

-                                                                         
    return m_module;
-                                                                         
    }
-
-                                                                         
    #endif
+#endif
Index: bibletime/backend/cswordmoduleinfo.cpp
===================================================================
RCS file:
/cvsroot/bibletime/bibletime/bibletime/backend/cswordmoduleinfo.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -3 -p -r1.127 -r1.128
--- bibletime/backend/cswordmoduleinfo.cpp      21 Oct 2006 17:47:39 -0000
    1.127
+++ bibletime/backend/cswordmoduleinfo.cpp      1 Nov 2006 09:08:44 -0000 
    1.128
@@ -54,7 +54,7 @@

 //Increment this, if the index format changes
 //Then indices on the user's systems will be rebuilt
-const unsigned int INDEX_VERSION = 2;
+const unsigned int INDEX_VERSION = 3;

 CSwordModuleInfo::CSwordModuleInfo(sword::SWModule * module,
CSwordBackend * const usedBackend) {
        m_module = module;
@@ -225,7 +225,9 @@ void CSwordModuleInfo::buildIndex() {
        backend()->setOption( CSwordModuleInfo::scriptureReferences, 
false );
        backend()->setOption( CSwordModuleInfo::redLetterWords,  false );

-       lucene::analysis::WhitespaceAnalyzer an;
+       // do not use any stop words
+       const TCHAR* stop_words[]  = { NULL };
+       lucene::analysis::standard::StandardAnalyzer an( stop_words );
        QString index = getModuleStandardIndexLocation();

        QDir dir;
@@ -370,7 +372,9 @@ const bool CSwordModuleInfo::searchIndex
        m_searchResult.ClearList();

        try {
-               lucene::analysis::WhitespaceAnalyzer analyzer;
+               // do not use any stop words
+               const TCHAR* stop_words[]  = { NULL };
+               lucene::analysis::standard::StandardAnalyzer analyzer(
stop_words );
                lucene::search::IndexSearcher
searcher(getModuleStandardIndexLocation().ascii());
                lucene_utf8towcs(wcharBuffer, searchedText.utf8(),
LUCENE_MAX_FIELD_LENGTH);
                util::scoped_ptr<lucene::search::Query> q(
lucene::queryParser::QueryParser::parse(wcharBuffer, _T("content"),
&analyzer) );
Index: bibletime/backend/ctextrendering.cpp
===================================================================
RCS file:
/cvsroot/bibletime/bibletime/bibletime/backend/ctextrendering.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -p -r1.58 -r1.59
--- bibletime/backend/ctextrendering.cpp        20 Sep 2006 17:11:36 -0000
    1.58
+++ bibletime/backend/ctextrendering.cpp        1 Nov 2006 11:17:50 -0000 
    1.59
@@ -217,6 +217,7 @@ const QString CTextRendering::renderKeyT
 const QString CTextRendering::renderKeyRange( const QString& start, const
QString& stop, const ListCSwordModuleInfo& modules, const QString&
highlightKey, const KeyTreeItem::Settings& keySettings ) {

        CSwordModuleInfo* module = modules.first();
+       qWarning( "renderKeyRange start %s stop %s \n", start.latin1(),
stop.latin1() );

        util::scoped_ptr<CSwordKey> lowerBound(
CSwordKey::createInstance(module) );
        lowerBound->key(start);
@@ -249,8 +250,14 @@ const QString CTextRendering::renderKeyR

                        /*TODO: We need to take care of linked verses if
we render one or (esp) more modules
                        If the verses 2,3,4,5 are linked to 1, it should
be displayed as one entry with the caption 1-5 */
+
+                       if (vk_start->Chapter() == 0){ //range was
0:0-1:x, render 0:0 first and jump to 1:0
+                               vk_start->Verse(0);
+                               tree.append( new
KeyTreeItem(vk_start->key(), modules, settings) );
+                               vk_start->Chapter(1);
+                               vk_start->Verse(0);
+                       }
                        tree.append( new KeyTreeItem(vk_start->key(),
modules, settings) );
-
                        ok = vk_start->next(CSwordVerseKey::UseVerse);
                }

Index: bibletime/frontend/searchdialog/csearchdialog.h
===================================================================
RCS file:
/cvsroot/bibletime/bibletime/bibletime/frontend/searchdialog/csearchdialog.h,v
retrieving revision 1.46
diff -u -3 -p -r1.46 csearchdialog.h
--- bibletime/frontend/searchdialog/csearchdialog.h     24 Mar 2006
14:32:41 -0000      1.46
+++ bibletime/frontend/searchdialog/csearchdialog.h     24 Nov 2006
18:52:02 -0000
@@ -132,81 +132,7 @@ private:
        CSwordModuleSearch m_searcher;
 };

-       namespace Options {
-class CModuleChooser : public KListView, public CPointers {
-       Q_OBJECT
-public:
-class ModuleCheckBoxItem : virtual public QCheckListItem {
-public:
-               ModuleCheckBoxItem(QListViewItem* item, CSwordModuleInfo*
module);
-               ~ModuleCheckBoxItem();
-               /**
-               * Returns the used module.
-               */
-               CSwordModuleInfo* const module() const;
-private:
-               CSwordModuleInfo* m_module;
-       };

-       CModuleChooser(QWidget* parent);
-       ~CModuleChooser();
-       /**
-       * Sets the list of modules and updates the state of the checkbox
items.
-       */
-       void setModules( ListCSwordModuleInfo modules );
-       /**
-       * Returns a list of selected modules.
-       */
-       ListCSwordModuleInfo modules();
-
-public slots:
-       /**
-       * Reimplemented to open the folders which contain checked module
items
-       */
-       virtual void show();
-
-
-protected: // Protected methods
-       /**
-       * Initializes this widget and the childs of it.
-       */
-       void initView();
-       /**
-       * Initializes the tree of this widget.
-       */
-       void initTree();
-};
-
-class CModuleChooserDialog : public KDialogBase  {
-       Q_OBJECT
-public:
-       CModuleChooserDialog(QWidget* parentDialog, ListCSwordModuleInfo
modules);
-       ~CModuleChooserDialog();
-
-signals:
-       void modulesChanged(ListCSwordModuleInfo modules);
-
-protected: // Protected methods
-       /**
-       * Initializes the view of this dialog
-       */
-       void initView();
-       /**
-       * Initializes the connections of this dialog.
-       */
-       void initConnections();
-
-protected slots: // Protected slots
-       /**
-       * Reimplementation to handle the modules.
-       */
-       virtual void slotOk();
-
-private:
-       Options::CModuleChooser* m_moduleChooser;
-};
-
-       } //end of namespace Search::Options
 } //end of namespace Search

 #endif
Index: bibletime/frontend/searchdialog/csearchdialogpages.cpp
===================================================================
RCS file:
/cvsroot/bibletime/bibletime/bibletime/frontend/searchdialog/csearchdialogpages.cpp,v
retrieving revision 1.90
diff -u -3 -p -r1.90 csearchdialogpages.cpp
--- bibletime/frontend/searchdialog/csearchdialogpages.cpp      21 Oct
2006 17:47:39 -0000      1.90
+++ bibletime/frontend/searchdialog/csearchdialogpages.cpp      24 Nov
2006 18:52:02 -0000
@@ -16,6 +16,7 @@
 #include "crangechooser.h"
 #include "cmoduleresultview.h"
 #include "csearchresultview.h"
+#include "cmodulechooser.h"

 #include "backend/cswordversekey.h"
 #include "backend/cdisplayrendering.h"
Index: bibletime/util/cresmgr.cpp
===================================================================
RCS file: /cvsroot/bibletime/bibletime/bibletime/util/cresmgr.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -p -r1.34 -r1.35
--- bibletime/util/cresmgr.cpp  25 Feb 2006 11:38:17 -0000      1.34
+++ bibletime/util/cresmgr.cpp  24 Nov 2006 16:22:49 -0000      1.35
@@ -1016,11 +1016,11 @@ The others are user defined search scope
                                }
                                {
                                        using namespace nextChapter;
-                                       tooltip = i18n ("Show the previous
chapter of the work.") ;
+                                       tooltip = i18n ("Show the next
chapter of the work.") ;
                                }
                                {
                                        using namespace previousChapter;
-                                       tooltip = i18n ("Show the next
chapter of the work.") ;
+                                       tooltip = i18n ("Show the previous
chapter of the work.") ;
                                }
                                {
                                        using namespace verseList;


----------------------------------------------------------------------

Comment By: Martin Gruner (mgruner)
Date: 2006-11-24 19:26

Message:
Logged In: YES 
user_id=169722
Originator: NO

Ok. After looking a little more closely, I believe this must be caused by
compiling in "release" mode where all sources are put together into one
big file. For some reason, this does not work with our code. If you find
out more, please speak up.

----------------------------------------------------------------------

Comment By: Martin Gruner (mgruner)
Date: 2006-11-24 19:15

Message:
Logged In: YES 
user_id=169722
Originator: NO

I have gcc 4.1.2 myself. This cannot be the reason. No idea why? Do you
have any other information?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100954&aid=1595706&group_id=954



More information about the bt-devel mailing list