mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-06 04:14:22 +01:00
Fix app crash when callin StatusBar::clear twice during single app lifetime.
This commit is contained in:
parent
891ea481a1
commit
05a498393c
@ -92,7 +92,7 @@
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_tabInfo">
|
||||
<attribute name="title">
|
||||
@ -235,7 +235,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>98</width>
|
||||
<width>83</width>
|
||||
<height>69</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -305,7 +305,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>98</width>
|
||||
<width>83</width>
|
||||
<height>69</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -228,6 +228,7 @@ void StatusBar::clear() {
|
||||
|
||||
if (should_remove_widget) {
|
||||
widget->deleteLater();
|
||||
act->setProperty("widget", QVariant());
|
||||
}
|
||||
|
||||
if (should_remove_action) {
|
||||
|
@ -19,7 +19,7 @@ class StatusBar : public QStatusBar, public BaseBar {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit StatusBar(QWidget* parent = 0);
|
||||
explicit StatusBar(QWidget* parent = nullptr);
|
||||
virtual ~StatusBar();
|
||||
|
||||
QList<QAction*> availableActions() const;
|
||||
|
@ -36,7 +36,7 @@ class AdBlockIcon : public QAction {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AdBlockIcon(AdBlockManager* parent = 0);
|
||||
explicit AdBlockIcon(AdBlockManager* parent = nullptr);
|
||||
virtual ~AdBlockIcon();
|
||||
|
||||
void popupBlocked(const QString& ruleString, const QUrl& url);
|
||||
@ -54,7 +54,6 @@ class AdBlockIcon : public QAction {
|
||||
|
||||
private:
|
||||
AdBlockManager* m_manager;
|
||||
|
||||
QVector<QPair<AdBlockRule*, QUrl>> m_blockedPopups;
|
||||
QTimer* m_flashTimer;
|
||||
int m_timerTicks;
|
||||
|
@ -68,6 +68,7 @@ class AdBlockManager : public QObject {
|
||||
bool removeSubscription(AdBlockSubscription* subscription);
|
||||
|
||||
AdBlockCustomList* customList() const;
|
||||
|
||||
inline AdBlockIcon* adBlockIcon() const {
|
||||
return m_adblockIcon;
|
||||
}
|
||||
@ -89,12 +90,10 @@ class AdBlockManager : public QObject {
|
||||
bool m_loaded;
|
||||
bool m_enabled;
|
||||
AdBlockIcon* m_adblockIcon;
|
||||
|
||||
QList<AdBlockSubscription*> m_subscriptions;
|
||||
AdBlockMatcher* m_matcher;
|
||||
QStringList m_disabledRules;
|
||||
AdBlockUrlInterceptor* m_interceptor;
|
||||
|
||||
QPointer<AdBlockDialog> m_adBlockDialog;
|
||||
QMutex m_mutex;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user