diff options
author | Arno <arno@disconnect.de> | 2018-06-13 10:14:00 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-06-13 10:14:00 +0200 |
commit | 353e777931fd7be08fbf2d91cdb16479df0acb81 (patch) | |
tree | 543ff0626676510d9bbd61f192ad0d8f50c0bb10 | |
parent | 10a8921bbcd9802ad2425e8cee1e5ca70fb0b241 (diff) | |
download | ShemovCleaner-353e777931fd7be08fbf2d91cdb16479df0acb81.tar.gz ShemovCleaner-353e777931fd7be08fbf2d91cdb16479df0acb81.tar.bz2 ShemovCleaner-353e777931fd7be08fbf2d91cdb16479df0acb81.zip |
Remove ClearAndSelectFirst
Slowed down startup by minutes! Dunno why, don't really care. If you
need the search dialog, wait for it then :)
-rw-r--r-- | searchdialog.cpp | 16 | ||||
-rw-r--r-- | searchdialog.h | 1 |
2 files changed, 0 insertions, 17 deletions
diff --git a/searchdialog.cpp b/searchdialog.cpp index 4e62f5e..ada0741 100644 --- a/searchdialog.cpp +++ b/searchdialog.cpp @@ -96,7 +96,6 @@ void SearchDialog::doSearch(){ }else if(type == Actors){ doSearchActor(); } - clearOrSelectFirst(); qApp->restoreOverrideCursor(); } @@ -412,18 +411,3 @@ void SearchDialog::doActorGenres(QStandardItem *item){ } } } - -void SearchDialog::clearOrSelectFirst(){ - QModelIndex first = mResV->selectionModel()->model()->index(0, 0); - if(first.isValid()){ - mResV->selectionModel()->setCurrentIndex(first, QItemSelectionModel::ClearAndSelect); - }else{ - mDataM->clear(); - int type = mTypeSel->currentData().toInt(); - if(type == Title){ - mDataM->setHeaderData(0, Qt::Horizontal, tr("Parts")); - }else if(type == Filename || type == Actors){ - mDataM->setHeaderData(0, Qt::Horizontal, tr("Series")); - } - } -} diff --git a/searchdialog.h b/searchdialog.h index dca9431..b5b9ba4 100644 --- a/searchdialog.h +++ b/searchdialog.h @@ -36,7 +36,6 @@ class SearchDialog : public QDialog { private: void doChild(QStandardItem *item, int childMode); void doActorGenres(QStandardItem *item); - void clearOrSelectFirst(); QLineEdit *mSearch; QComboBox *mTypeSel; SearchView *mResV; |