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()
search_button->setText(tr("Search")); search_button->setText(tr("Search"));
return; return;
} }
allTabsSetActiveState(false);
} }
// Reload environment variables (proxy) // Reload environment variables (proxy)
@ -469,7 +468,6 @@ void SearchEngine::searchFinished(int exitcode, QProcess::ExitStatus)
} }
} }
search_status->setText(currentSearchTab->status); search_status->setText(currentSearchTab->status);
activeSearchTab->isActive = false;
activeSearchTab = 0; activeSearchTab = 0;
search_button->setText(tr("Search")); search_button->setText(tr("Search"));
} }
@ -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:
QList<QPointer<SearchTab> > all_tab; // To store all tabs QList<QPointer<SearchTab> > all_tab; // To store all tabs
const SearchCategories full_cat_names; const SearchCategories full_cat_names;
MainWindow *mp_mainWindow; MainWindow *mp_mainWindow;
inline void allTabsSetActiveState(bool);
}; };
#endif #endif

2
src/searchengine/searchtab.cpp

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

1
src/searchengine/searchtab.h

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

Loading…
Cancel
Save