mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
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.
This commit is contained in:
parent
e34cc79dad
commit
0c23d22472
@ -269,7 +269,7 @@ int Utils::Misc::pythonVersion()
|
||||
return version;
|
||||
}
|
||||
|
||||
QString misc::pythonExecutable()
|
||||
QString Utils::Misc::pythonExecutable()
|
||||
{
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
/*
|
||||
|
@ -180,6 +180,11 @@ void SearchEngine::giveFocusToSearchInput() {
|
||||
|
||||
// Function called when we click on search button
|
||||
void SearchEngine::on_search_button_clicked() {
|
||||
if (Utils::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();
|
||||
|
Loading…
Reference in New Issue
Block a user