Browse Source

searchengine: drop unused flag and related code

adaptive-webui-19844
Gabriele 9 years ago
parent
commit
1b24feb4f4
  1. 8
      src/searchengine/searchengine.cpp
  2. 1
      src/searchengine/searchengine.h
  3. 2
      src/searchengine/searchtab.cpp
  4. 1
      src/searchengine/searchtab.h

8
src/searchengine/searchengine.cpp

@ -215,7 +215,6 @@ void SearchEngine::on_search_button_clicked() @@ -215,7 +215,6 @@ void SearchEngine::on_search_button_clicked()
search_button->setText(tr("Search"));
return;
}
allTabsSetActiveState(false);
}
// Reload environment variables (proxy)
@ -469,7 +468,6 @@ void SearchEngine::searchFinished(int exitcode, QProcess::ExitStatus) @@ -469,7 +468,6 @@ void SearchEngine::searchFinished(int exitcode, QProcess::ExitStatus)
}
}
search_status->setText(currentSearchTab->status);
activeSearchTab->isActive = false;
activeSearchTab = 0;
search_button->setText(tr("Search"));
}
@ -577,9 +575,3 @@ void SearchEngine::on_goToDescBtn_clicked() @@ -577,9 +575,3 @@ void SearchEngine::on_goToDescBtn_clicked()
}
}
}
inline void SearchEngine::allTabsSetActiveState(bool newState)
{
foreach(SearchTab *tab, all_tab)
tab->isActive = newState;
}

1
src/searchengine/searchengine.h

@ -126,7 +126,6 @@ private: @@ -126,7 +126,6 @@ private:
QList<QPointer<SearchTab> > all_tab; // To store all tabs
const SearchCategories full_cat_names;
MainWindow *mp_mainWindow;
inline void allTabsSetActiveState(bool);
};
#endif

2
src/searchengine/searchtab.cpp

@ -48,8 +48,6 @@ SearchTab::SearchTab(SearchEngine *parent) : QWidget(), parent(parent) @@ -48,8 +48,6 @@ SearchTab::SearchTab(SearchEngine *parent) : QWidget(), parent(parent)
resultsBrowser->setSelectionMode(QAbstractItemView::ExtendedSelection);
box->addWidget(results_lbl);
box->addWidget(resultsBrowser);
// New tab is created with new search
isActive = true;
setLayout(box);
// Set Search results list model

1
src/searchengine/searchtab.h

@ -71,7 +71,6 @@ public: @@ -71,7 +71,6 @@ public:
QTreeView * getCurrentTreeView();
void setRowColor(int row, QString color);
QHeaderView* header() const;
bool isActive;
QString status;
};

Loading…
Cancel
Save