diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-31 22:45:57 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 15:38:18 +0100 |
| commit | 91081315cf7b654f5defe855dea3dc1f71b0962c (patch) | |
| tree | 5bf6a0a7e23e3f18a0e0528e94a9f468fe362654 /src | |
| parent | 5d82e9cfeced490060f9c4544ba1ea1ca623c42c (diff) | |
Remove unused methods.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 44 | ||||
| -rw-r--r-- | src/mainwindow.h | 7 |
2 files changed, 2 insertions, 49 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9b254250..033bb0e0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -321,6 +321,8 @@ MainWindow::MainWindow(Settings &settings setupModList(); ui->espList->setup(m_OrganizerCore, this, ui); + connect(ui->espList->selectionModel(), &QItemSelectionModel::selectionChanged, + [=](auto&& selection) { esplistSelectionsChanged(selection); }); ui->bsaList->setLocalMoveOnly(true); ui->bsaList->setHeaderHidden(true); @@ -448,8 +450,6 @@ MainWindow::MainWindow(Settings &settings m_CheckBSATimer.setSingleShot(true); connect(&m_CheckBSATimer, SIGNAL(timeout()), this, SLOT(checkBSAList())); - connect(ui->espList->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(esplistSelectionsChanged(QItemSelection))); - setFilterShortcuts(ui->modList, ui->modFilterEdit); setFilterShortcuts(ui->espList, ui->espFilterEdit); setFilterShortcuts(ui->downloadView, ui->downloadFilterEdit); @@ -2164,31 +2164,6 @@ void MainWindow::on_actionModify_Executables_triggered() } } -void MainWindow::setModListSorting(int index) -{ - Qt::SortOrder order = ((index & 0x01) != 0) ? Qt::DescendingOrder : Qt::AscendingOrder; - int column = index >> 1; - ui->modList->header()->setSortIndicator(column, order); -} - -void MainWindow::setESPListSorting(int index) -{ - switch (index) { - case 0: { - ui->espList->header()->setSortIndicator(1, Qt::AscendingOrder); - } break; - case 1: { - ui->espList->header()->setSortIndicator(1, Qt::DescendingOrder); - } break; - case 2: { - ui->espList->header()->setSortIndicator(0, Qt::AscendingOrder); - } break; - case 3: { - ui->espList->header()->setSortIndicator(0, Qt::DescendingOrder); - } break; - } -} - void MainWindow::refresherProgress(const DirectoryRefreshProgress* p) { if (p->finished()) { @@ -3299,21 +3274,6 @@ void MainWindow::on_displayCategoriesBtn_toggled(bool checked) setCategoryListVisible(checked); } -void MainWindow::updateESPLock(int espIndex, bool locked) -{ - QItemSelection currentSelection = ui->espList->selectionModel()->selection(); - if (currentSelection.count() == 0) { - // this path is probably useless - m_OrganizerCore.pluginList()->lockESPIndex(espIndex, locked); - } else { - Q_FOREACH (const QModelIndex &idx, currentSelection.indexes()) { - if (m_OrganizerCore.pluginList()->isEnabled(mapToModel(m_OrganizerCore.pluginList(), idx).row())) { - m_OrganizerCore.pluginList()->lockESPIndex(mapToModel(m_OrganizerCore.pluginList(), idx).row(), locked); - } - } - } -} - void MainWindow::removeFromToolbar(QAction* action) { const auto& title = action->text(); diff --git a/src/mainwindow.h b/src/mainwindow.h index 404df36b..c6e94aa9 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -124,9 +124,6 @@ public: bool addProfile(); void updateBSAList(const QStringList &defaultArchives, const QStringList &activeArchives); - void setModListSorting(int index); - void setESPListSorting(int index); - void saveArchiveList(); void installTranslator(const QString &name); @@ -214,16 +211,12 @@ private: bool errorReported(QString &logFile); - void updateESPLock(int espIndex, bool locked); - static void setupNetworkProxy(bool activate); void activateProxy(bool activate); bool createBackup(const QString &filePath, const QDateTime &time); QString queryRestore(const QString &filePath); - void addPluginSendToContextMenu(QMenu *menu); - QMenu *openFolderMenu(); void dropLocalFile(const QUrl &url, const QString &outputDir, bool move); |
