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
|
# Check if we need to rebuild the index
|
||||||
if SHARED.project.index.indexBroken:
|
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()
|
self.rebuildIndex()
|
||||||
|
|
||||||
# Make sure the changed status is set to false on things opened
|
# Make sure the changed status is set to false on things opened
|
||||||
@@ -729,7 +730,7 @@ class GuiMain(QMainWindow):
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def rebuildIndex(self, beQuiet: bool = False) -> None:
|
def rebuildIndex(self) -> None:
|
||||||
"""Rebuild the entire index."""
|
"""Rebuild the entire index."""
|
||||||
if SHARED.hasProject:
|
if SHARED.hasProject:
|
||||||
logger.info("Rebuilding index ...")
|
logger.info("Rebuilding index ...")
|
||||||
@@ -746,8 +747,7 @@ class GuiMain(QMainWindow):
|
|||||||
self._updateStatusWordCount()
|
self._updateStatusWordCount()
|
||||||
QApplication.restoreOverrideCursor()
|
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
|
# Main Dialogs
|
||||||
|
|||||||
@@ -713,7 +713,7 @@ def testGuiMain_Features(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
|
|||||||
cHandle = SHARED.project.newFile("Jane", C.hCharRoot)
|
cHandle = SHARED.project.newFile("Jane", C.hCharRoot)
|
||||||
newDoc = SHARED.project.storage.getDocument(cHandle)
|
newDoc = SHARED.project.storage.getDocument(cHandle)
|
||||||
newDoc.writeDocument("# Jane\n\n@tag: Jane\n\n")
|
newDoc.writeDocument("# Jane\n\n@tag: Jane\n\n")
|
||||||
nwGUI.rebuildIndex(beQuiet=True)
|
nwGUI.rebuildIndex()
|
||||||
|
|
||||||
assert SHARED.focusMode is False
|
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)
|
cHandle = SHARED.project.newFile("A Note", C.hCharRoot)
|
||||||
newDoc = SHARED.project.storage.getDocument(cHandle)
|
newDoc = SHARED.project.storage.getDocument(cHandle)
|
||||||
newDoc.writeDocument("# A Note\n\n")
|
newDoc.writeDocument("# A Note\n\n")
|
||||||
nwGUI.rebuildIndex(beQuiet=True)
|
nwGUI.rebuildIndex()
|
||||||
|
|
||||||
status = nwGUI.mainStatus
|
status = nwGUI.mainStatus
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user