def METHOD_NAME():
    """Stop the document watcher."""
    global watcher
    if watcher is not None:
        watcher.fileChanged.disconnect(fileChanged)
        watcher.removePaths(watcher.files())
        app.documentLoaded.disconnect(documentLoaded)
        app.documentUrlChanged.disconnect(documentUrlChanged)
        app.documentClosed.disconnect(documentClosed)
        app.documentSaving.disconnect(whileSaving)
        watcher.deleteLater()
        watcher = None