Fixed a typo and downgraded some error messages in the index class to info
This commit is contained in:
+6
-6
@@ -271,16 +271,16 @@ class NWIndex():
|
|||||||
theRoot = self.theProject.projTree.getRootItem(tHandle)
|
theRoot = self.theProject.projTree.getRootItem(tHandle)
|
||||||
|
|
||||||
if theItem is None:
|
if theItem is None:
|
||||||
logger.error("Not indexing unknown item %s" % tHandle)
|
logger.info("Not indexing unknown item %s" % tHandle)
|
||||||
return False
|
return False
|
||||||
if theItem.itemType != nwItemType.FILE:
|
if theItem.itemType != nwItemType.FILE:
|
||||||
logger.error("Not indexing non-file item %s" % tHandle)
|
logger.info("Not indexing non-file item %s" % tHandle)
|
||||||
return False
|
return False
|
||||||
if theItem.itemLayout == nwItemLayout.NO_LAYOUT:
|
if theItem.itemLayout == nwItemLayout.NO_LAYOUT:
|
||||||
logger.error("Not indexing no-layout item %s" % tHandle)
|
logger.info("Not indexing no-layout item %s" % tHandle)
|
||||||
return False
|
return False
|
||||||
if theItem.parHandle is None:
|
if theItem.parHandle is None:
|
||||||
logger.error("Not indexing orphaned item %s" % tHandle)
|
logger.info("Not indexing orphaned item %s" % tHandle)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Run word counter for the whole text
|
# Run word counter for the whole text
|
||||||
@@ -289,10 +289,10 @@ class NWIndex():
|
|||||||
|
|
||||||
# If the file is archived or trashed, we don't index the file itself
|
# If the file is archived or trashed, we don't index the file itself
|
||||||
if self.theProject.projTree.isTrashRoot(theItem.parHandle):
|
if self.theProject.projTree.isTrashRoot(theItem.parHandle):
|
||||||
logger.error("Not indexing trash item %s" % tHandle)
|
logger.info("Not indexing trash item %s" % tHandle)
|
||||||
return False
|
return False
|
||||||
if theRoot.itemClass == nwItemClass.ARCHIVE:
|
if theRoot.itemClass == nwItemClass.ARCHIVE:
|
||||||
logger.error("Not indexing archived item %s" % tHandle)
|
logger.info("Not indexing archived item %s" % tHandle)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
itemClass = theItem.itemClass
|
itemClass = theItem.itemClass
|
||||||
|
|||||||
+1
-1
@@ -446,7 +446,7 @@ class GuiDocEditor(QTextEdit):
|
|||||||
return self.textCursor().selectionEnd()
|
return self.textCursor().selectionEnd()
|
||||||
|
|
||||||
def saveCursorPosition(self):
|
def saveCursorPosition(self):
|
||||||
"""Save the cursor position to the current project otem.
|
"""Save the cursor position to the current project item object.
|
||||||
"""
|
"""
|
||||||
theItem = self.nwDocument.getCurrentItem()
|
theItem = self.nwDocument.getCurrentItem()
|
||||||
if theItem is not None:
|
if theItem is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user