From 689c3ad786642eea9a97bc29272ca0cdd86af748 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 1 Feb 2017 08:34:42 -0500 Subject: Silence a file watcher warning when opening a blank or new file. --- src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp') diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp index e8eaa007..a0aff9cc 100644 --- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp @@ -83,7 +83,7 @@ void PlainTextEditor::LoadFile(QString filepath){ this->centerCursor(); //scroll until cursor is centered (if possible) } hasChanges = false; - watcher->addPath(filepath); + if(QFile::exists(filepath)){ watcher->addPath(filepath); } emit FileLoaded(this->whatsThis()); } -- cgit