mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Merge pull request #2338 from Joern-R/QtWebEngine
QtWebEngine Cache in User Directory
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user