Merge pull request #2338 from Joern-R/QtWebEngine

QtWebEngine Cache in User Directory
This commit is contained in:
Joern
2017-02-13 20:31:10 +01:00
committed by GitHub
3 changed files with 17 additions and 32 deletions

View File

@@ -97,14 +97,7 @@ ChooseCyclistDialog::getList()
QStringListIterator i(home.entryList(QDir::Dirs | QDir::NoDotAndDotDot));
while (i.hasNext()) {
QString name = i.next();
#ifdef NOWEBKIT
#ifdef WIN32
// QtWebEngine puts it's cache into the User directory (only on Windows) - so do not show in list
QStringList webEngineDirs;
webEngineDirs << "QtWebEngine" << "cache";
if (webEngineDirs.contains(name)) continue;
#endif
#endif
SKIP_QTWE_CACHE // skip Folder Names created by QTWebEngine on Windows
QListWidgetItem *newone = new QListWidgetItem(name, listWidget);
// get avatar image if it exists

View File

@@ -1766,14 +1766,7 @@ MainWindow::setOpenWindowMenu()
while (i.hasNext()) {
QString name = i.next();
#ifdef NOWEBKIT
#ifdef WIN32
// QtWebEngine puts it's cache into the User directory (only on Windows) - so do not show in list
QStringList webEngineDirs;
webEngineDirs << "QtWebEngine" << "cache";
if (webEngineDirs.contains(name)) continue;
#endif
#endif
SKIP_QTWE_CACHE // skip Folder Names created by QTWebEngine on Windows
// new action
QAction *action = new QAction(QString("%1").arg(name), this);
@@ -1815,14 +1808,7 @@ MainWindow::setOpenTabMenu()
while (i.hasNext()) {
QString name = i.next();
#ifdef NOWEBKIT
#ifdef WIN32
// QtWebEngine puts it's cache into the User directory (only on Windows) - so do not show in list
QStringList webEngineDirs;
webEngineDirs << "QtWebEngine" << "cache";
if (webEngineDirs.contains(name)) continue;
#endif
#endif
SKIP_QTWE_CACHE // skip Folder Names created by QTWebEngine on Windows
// new action
QAction *action = new QAction(QString("%1").arg(name), this);
@@ -1864,14 +1850,7 @@ MainWindow::setBackupAthleteMenu()
while (i.hasNext()) {
QString name = i.next();
#ifdef NOWEBKIT
#ifdef WIN32
// QtWebEngine puts it's cache into the User directory (only on Windows) - so do not show in list
QStringList webEngineDirs;
webEngineDirs << "QtWebEngine" << "cache";
if (webEngineDirs.contains(name)) continue;
#endif
#endif
SKIP_QTWE_CACHE // skip Folder Names created by QTWebEngine on Windows
// new action
QAction *action = new QAction(QString("%1").arg(name), this);

View File

@@ -40,6 +40,19 @@
#include <AvailabilityMacros.h>
#endif
#if defined(NOWEBKIT) && defined(WIN32)
// Macro to avoid Code Duplication in multiple files
// QtWebEngine puts it's cache into the User directory (only on Windows) - so do not show in list
# define SKIP_QTWE_CACHE \
QStringList webEngineDirs; \
webEngineDirs << "QtWebEngine" << "cache"; \
if (webEngineDirs.contains(name)) continue;
#else
# define SKIP_QTWE_CACHE
#endif
class QTFullScreen;
class GcToolBar;
class GcScopeBar;