@ -33,7 +33,6 @@
@@ -33,7 +33,6 @@
# include <QCompleter>
# include <QSettings>
# include <QMessageBox>
# include <QSystemTrayIcon>
# include <QTemporaryFile>
# include <QSystemTrayIcon>
# include <iostream>
@ -49,11 +48,12 @@
@@ -49,11 +48,12 @@
# include "downloadthread.h"
# include "misc.h"
# include "searchlistdelegate.h"
# include "GUI.h"
# define SEARCHHISTORY_MAXSIZE 50
/*SEARCH ENGINE START*/
SearchEngine : : SearchEngine ( Bittorrent * BTSession , QSystemTrayIcon * systrayIc on) : QWidget ( ) , BTSession ( BTSession ) , systrayIcon ( systrayIcon ) {
SearchEngine : : SearchEngine ( GUI * parent , Bittorrent * BTSessi on) : QWidget ( parent ) , BTSession ( BTSession ) , parent ( parent ) {
setupUi ( this ) ;
// new qCompleter to the search pattern
startSearchHistory ( ) ;
@ -428,8 +428,8 @@ void SearchEngine::updateNova() {
@@ -428,8 +428,8 @@ void SearchEngine::updateNova() {
void SearchEngine : : searchFinished ( int exitcode , QProcess : : ExitStatus ) {
QSettings settings ( " qBittorrent " , " qBittorrent " ) ;
bool useNotificationBalloons = settings . value ( " Preferences/General/NotificationBaloons " , true ) . toBool ( ) ;
if ( systrayIcon & & useNotificationBalloons ) {
systrayIcon - > showMessage ( tr ( " Search Engine " ) , tr ( " Search has finished " ) , QSystemTrayIcon : : Information , TIME_TRAY_BALLOON ) ;
if ( useNotificationBalloons & & parent - > getCurrentTabIndex ( ) ! = TAB_SEARCH ) {
parent - > showNotificationBaloon ( tr ( " Search Engine " ) , tr ( " Search has finished " ) ) ;
}
if ( exitcode ) {
search_status - > setText ( tr ( " An error occured during search... " ) ) ;