[pim/pim-sieve-editor] src: Don't activate actions when network is down

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 866cb79a9169d6c9fac10ade971bed42ac55d7de by Laurent Montel.
Committed on 14/08/2026 at 05:22.
Pushed by mlaurent into branch 'master'.

Don't activate actions when network is down

M  +9    -0    src/sieveeditormainwindow.cpp

https://invent.kde.org/pim/pim-sieve-editor/-/commit/866cb79a9169d6c9fac10ade971bed42ac55d7de

diff --git a/src/sieveeditormainwindow.cpp b/src/sieveeditormainwindow.cpp
index 51a02fc8..8747d9ef 100644
--- a/src/sieveeditormainwindow.cpp
+++ b/src/sieveeditormainwindow.cpp
@@ -447,16 +447,25 @@ void SieveEditorMainWindow::slotUploadScript()
 
 void SieveEditorMainWindow::slotDesactivateScript()
 {
+    if (mNetworkIsDown) {
+        return;
+    }
     mMainWidget->sieveEditorMainWidget()->desactivateScript();
 }
 
 void SieveEditorMainWindow::slotEditScript()
 {
+    if (mNetworkIsDown) {
+        return;
+    }
     mMainWidget->sieveEditorMainWidget()->editScript();
 }
 
 void SieveEditorMainWindow::slotCreateNewScript()
 {
+    if (mNetworkIsDown) {
+        return;
+    }
     mMainWidget->sieveEditorMainWidget()->createNewScript();
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.