Make compatible with nova2 plugins (new API)

This commit is contained in:
Christophe Dumez
2010-12-26 09:08:28 +00:00
parent f08d792e67
commit 6ff3de7686
2 changed files with 3 additions and 3 deletions

View File

@@ -594,7 +594,7 @@ void SearchEngine::searchFinished(int exitcode,QProcess::ExitStatus){
// SLOT to append one line to search results list // SLOT to append one line to search results list
// Line is in the following form : // Line is in the following form :
// file url | file name | file size | nb seeds | nb leechers | Search engine url // file url | file name | file size | nb seeds | nb leechers | Search engine url
void SearchEngine::appendSearchResult(QString line){ void SearchEngine::appendSearchResult(const QString &line){
if(!currentSearchTab) { if(!currentSearchTab) {
if(searchProcess->state() != QProcess::NotRunning){ if(searchProcess->state() != QProcess::NotRunning){
searchProcess->terminate(); searchProcess->terminate();
@@ -606,7 +606,7 @@ void SearchEngine::appendSearchResult(QString line){
return; return;
} }
QStringList parts = line.split("|"); QStringList parts = line.split("|");
if(parts.size() != 6){ if(parts.size() < 6){
return; return;
} }
Q_ASSERT(currentSearchTab); Q_ASSERT(currentSearchTab);

View File

@@ -91,7 +91,7 @@ protected slots:
#else #else
void closeTab(int index); void closeTab(int index);
#endif #endif
void appendSearchResult(QString line); void appendSearchResult(const QString& line);
void searchFinished(int exitcode,QProcess::ExitStatus); void searchFinished(int exitcode,QProcess::ExitStatus);
void readSearchOutput(); void readSearchOutput();
void searchStarted(); void searchStarted();