[PictureLoader] Allow saving downloaded images to local storage and not just the QNetworkManager cache (#6620)

* [PictureLoader] Allow saving downloaded images to local storage and not just the QNetworkManager cache.

Took 1 hour 11 minutes

Took 4 seconds


Took 25 seconds

* Give people options from a dropdown.

Took 1 hour 6 minutes

Took 3 seconds

* Simplify directory removal code.

Took 5 minutes

Took 8 seconds

* Merge pull request #8

* Create new category for new settings

* Split off storage settings

Took 47 minutes

Took 4 seconds

* Allow toggling between caching methods.

Took 1 hour 30 minutes

Took 9 seconds

* Adjust settings dialog.

Took 5 minutes

Took 59 seconds

Took 22 seconds

Took 6 seconds

* tr() strings

Took 1 minute

Took 6 seconds

* Readjust layout, default naming scheme.

Took 5 minutes

* Add stretch.

Took 9 minutes

* Make scrollable.

Took 2 minutes

* Add icon.

Took 7 minutes

* Change naming to be uniform.

Took 3 minutes

Took 3 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
This commit is contained in:
BruebachL 2026-05-16 20:15:10 +02:00 committed by GitHub
parent 20cd7ce73d
commit f8ce5c2e39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1382 additions and 132 deletions

View file

@ -213,11 +213,9 @@ private slots:
void actAddURL();
void actRemoveURL();
void actEditURL();
void clearDownloadedPicsButtonClicked();
void resetDownloadedURLsButtonClicked();
private:
QPushButton clearDownloadedPicsButton;
QPushButton resetDownloadURLs;
QLabel urlLinkLabel;
QCheckBox picDownloadCheckBox;
@ -227,18 +225,51 @@ private:
QLabel msDownloadSpoilersLabel;
QGroupBox *mpGeneralGroupBox;
QGroupBox *mpSpoilerGroupBox;
QLineEdit *mpSpoilerSavePathLineEdit;
QLabel mcSpoilerSaveLabel;
QLabel lastUpdatedLabel;
QLabel infoOnSpoilersLabel;
QPushButton *mpSpoilerPathButton;
QPushButton *updateNowButton;
};
class StorageSettingsPage : public AbstractSettingsPage
{
Q_OBJECT
public:
StorageSettingsPage();
void retranslateUi() override;
private slots:
void clearDownloadedPicsButtonClicked();
void clearImageBackupsButtonClicked();
void clearPixmapCacheButtonClicked();
private:
QPushButton clearDownloadedPicsButton;
QPushButton clearBackupsButton;
QPushButton clearPixmapCacheButton;
QGroupBox *mpCacheMethodGroupBox;
QGroupBox *mpNetworkCacheGroupBox;
QGroupBox *mpImageBackupGroupBox;
QGroupBox *mpPixmapCacheGroupBox;
QLabel networkCacheExplainerLabel;
QLabel imageBackupExplainerLabel;
QLabel pixmapCacheExplainerLabel;
QLabel cardPictureLoaderCacheMethodLabel;
QComboBox *cardPictureLoaderCacheMethodComboBox;
QLabel networkCacheLabel;
QSpinBox networkCacheEdit;
QLabel networkRedirectCacheTtlLabel;
QSpinBox networkRedirectCacheTtlEdit;
QSpinBox pixmapCacheEdit;
QLabel pixmapCacheLabel;
QLabel localCardImageStorageNamingSchemeLabel;
QComboBox *localCardImageStorageNamingSchemeComboBox;
};
class MessagesSettingsPage : public AbstractSettingsPage
@ -353,8 +384,8 @@ private slots:
private:
QListWidget *contentsWidget;
QStackedWidget *pagesWidget;
QListWidgetItem *generalButton, *appearanceButton, *userInterfaceButton, *deckEditorButton, *messagesButton,
*soundButton, *shortcutsButton;
QListWidgetItem *generalButton, *appearanceButton, *userInterfaceButton, *deckEditorButton, *storageButton,
*messagesButton, *soundButton, *shortcutsButton;
void createIcons();
void retranslateUi();