Parallel picture loader (#5977)

* Parallelize picture loader.

* Queue requests instead.

* Include a status bar for the picture loader.

* Save redirect cache on destruction.

* Address comments.

* Let's not overwrite an ambigious variable name.

* Lint.

* Oracle needs the status bar too.

* We actually get a free request if we hit a cached image.

* Fix cmake list.

* toString() the url.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-06-13 01:44:38 +02:00 committed by GitHub
parent 9af3fbc35f
commit fe57efb1a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 596 additions and 350 deletions

View file

@ -26,6 +26,11 @@ void SettingsButtonWidget::addSettingsWidget(QWidget *toAdd) const
popup->addSettingsWidget(toAdd);
}
void SettingsButtonWidget::removeSettingsWidget(QWidget *toRemove) const
{
popup->removeSettingsWidget(toRemove);
}
void SettingsButtonWidget::setButtonIcon(QPixmap iconMap)
{
button->setIcon(iconMap);

View file

@ -13,6 +13,7 @@ class SettingsButtonWidget : public QWidget
public:
explicit SettingsButtonWidget(QWidget *parent = nullptr);
void addSettingsWidget(QWidget *toAdd) const;
void removeSettingsWidget(QWidget *toRemove) const;
void setButtonIcon(QPixmap iconMap);
protected:
@ -25,6 +26,8 @@ private slots:
private:
QHBoxLayout *layout;
QToolButton *button;
public:
SettingsPopupWidget *popup;
};

View file

@ -29,6 +29,12 @@ void SettingsPopupWidget::addSettingsWidget(QWidget *toAdd) const
containerLayout->addWidget(toAdd); // Add to containerWidget's layout
}
void SettingsPopupWidget::removeSettingsWidget(QWidget *toRemove) const
{
containerLayout->removeWidget(toRemove);
toRemove->deleteLater();
}
void SettingsPopupWidget::adjustSizeToFitScreen()
{
QScreen *screen = QApplication::screenAt(this->pos());

View file

@ -13,6 +13,7 @@ class SettingsPopupWidget : public QWidget
public:
explicit SettingsPopupWidget(QWidget *parent = nullptr);
void addSettingsWidget(QWidget *toAdd) const;
void removeSettingsWidget(QWidget *toRemove) const;
void adjustSizeToFitScreen();
signals: