From 26b635ca33fdbb5a0acce2f10eeea53c3ffba058 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Tue, 21 Jul 2015 21:57:38 +0300 Subject: [PATCH] Show notification if Python is not found and a search is started Also, don't bother starting a search if it's known that Python is not available. --- src/searchengine/searchengine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/searchengine/searchengine.cpp b/src/searchengine/searchengine.cpp index c8770fa03..9ccc01c44 100644 --- a/src/searchengine/searchengine.cpp +++ b/src/searchengine/searchengine.cpp @@ -181,6 +181,11 @@ void SearchEngine::giveFocusToSearchInput() { // Function called when we click on search button void SearchEngine::on_search_button_clicked() { + if (misc::pythonVersion() < 0) { + mp_mainWindow->showNotificationBaloon(tr("Search Engine"), tr("Please install Python to use the Search Engine.")); + return; + } + if (searchProcess->state() != QProcess::NotRunning) { #ifdef Q_OS_WIN searchProcess->kill();