Remove quiet flag from index rebuild
This commit is contained in:
@@ -497,7 +497,8 @@ class GuiMain(QMainWindow):
|
||||
|
||||
# Check if we need to rebuild the index
|
||||
if SHARED.project.index.indexBroken:
|
||||
SHARED.info(self.tr("The project index is outdated or broken. Rebuilding index."))
|
||||
if not SHARED.project.index.indexUpgrade:
|
||||
SHARED.info(self.tr("The project index is broken. Rebuilding index."))
|
||||
self.rebuildIndex()
|
||||
|
||||
# Make sure the changed status is set to false on things opened
|
||||
@@ -729,7 +730,7 @@ class GuiMain(QMainWindow):
|
||||
|
||||
return
|
||||
|
||||
def rebuildIndex(self, beQuiet: bool = False) -> None:
|
||||
def rebuildIndex(self) -> None:
|
||||
"""Rebuild the entire index."""
|
||||
if SHARED.hasProject:
|
||||
logger.info("Rebuilding index ...")
|
||||
@@ -746,8 +747,7 @@ class GuiMain(QMainWindow):
|
||||
self._updateStatusWordCount()
|
||||
QApplication.restoreOverrideCursor()
|
||||
|
||||
if not beQuiet:
|
||||
SHARED.info(self.tr("The project index has been successfully rebuilt."))
|
||||
SHARED.info(self.tr("The project index has been successfully rebuilt."))
|
||||
|
||||
##
|
||||
# Main Dialogs
|
||||
|
||||
@@ -713,7 +713,7 @@ def testGuiMain_Features(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
|
||||
cHandle = SHARED.project.newFile("Jane", C.hCharRoot)
|
||||
newDoc = SHARED.project.storage.getDocument(cHandle)
|
||||
newDoc.writeDocument("# Jane\n\n@tag: Jane\n\n")
|
||||
nwGUI.rebuildIndex(beQuiet=True)
|
||||
nwGUI.rebuildIndex()
|
||||
|
||||
assert SHARED.focusMode is False
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ def testGuiStatusBar_Main(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
|
||||
cHandle = SHARED.project.newFile("A Note", C.hCharRoot)
|
||||
newDoc = SHARED.project.storage.getDocument(cHandle)
|
||||
newDoc.writeDocument("# A Note\n\n")
|
||||
nwGUI.rebuildIndex(beQuiet=True)
|
||||
nwGUI.rebuildIndex()
|
||||
|
||||
status = nwGUI.mainStatus
|
||||
|
||||
|
||||
Reference in New Issue
Block a user