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