summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2017-11-30 20:55:00 -0600
committerGitHub <noreply@github.com>2017-11-30 20:55:00 -0600
commitc55a923bb8b9b66661f32beed8445602400ef318 (patch)
tree850ead2730c8ab50babc865a505a513d8fba5f46 /src/mainwindow.cpp
parent7ec0b79eb49a27a3516d799a80d57000cde344da (diff)
parent797a007eab2695c231a00240225d77b3a9928992 (diff)
Merge pull request #132 from Silarn/mainline_dev
Numerous updates
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index ace7dbd8..84860767 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -145,6 +145,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QVariantList>
#include <QWhatsThis>
#include <QWidgetAction>
+#include <QWebEngineProfile>
#include <QDebug>
#include <QtGlobal>
@@ -199,6 +200,10 @@ MainWindow::MainWindow(QSettings &initSettings
, m_PluginContainer(pluginContainer)
, m_DidUpdateMasterList(false)
{
+ QWebEngineProfile::defaultProfile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies);
+ QWebEngineProfile::defaultProfile()->setHttpCacheMaximumSize(52428800);
+ QWebEngineProfile::defaultProfile()->setCachePath(m_OrganizerCore.settings().getCacheDirectory());
+ QWebEngineProfile::defaultProfile()->setPersistentStoragePath(m_OrganizerCore.settings().getCacheDirectory());
ui->setupUi(this);
updateWindowTitle(QString(), false);
@@ -352,6 +357,9 @@ MainWindow::MainWindow(QSettings &initSettings
connect(this, SIGNAL(styleChanged(QString)), this, SLOT(updateStyle(QString)));
+ connect(ui->espList->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(esplistSelectionsChanged(QItemSelection)));
+ connect(ui->modList->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(modlistSelectionsChanged(QItemSelection)));
+
m_UpdateProblemsTimer.setSingleShot(true);
connect(&m_UpdateProblemsTimer, SIGNAL(timeout()), this, SLOT(updateProblemsButton()));
@@ -868,6 +876,7 @@ void MainWindow::cleanup()
ui->logList->setModel(nullptr);
}
+ QWebEngineProfile::defaultProfile()->clearAllVisitedLinks();
m_IntegratedBrowser.close();
}
@@ -2115,6 +2124,18 @@ void MainWindow::modlistSelectionChanged(const QModelIndex &current, const QMode
ui->modList->verticalScrollBar()->repaint();
}
+void MainWindow::modlistSelectionsChanged(const QItemSelection &selected)
+{
+ m_OrganizerCore.pluginList()->highlightPlugins(selected, *m_OrganizerCore.directoryStructure());
+ ui->espList->verticalScrollBar()->repaint();
+}
+
+void MainWindow::esplistSelectionsChanged(const QItemSelection &selected)
+{
+ m_OrganizerCore.modList()->highlightMods(selected, *m_OrganizerCore.directoryStructure());
+ ui->modList->verticalScrollBar()->repaint();
+}
+
void MainWindow::modListSortIndicatorChanged(int, Qt::SortOrder)
{
ui->modList->verticalScrollBar()->repaint();