mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed crash when opening qupzilla:restore in multiple tabs.
closes #567
This commit is contained in:
parent
5cf6b1c565
commit
884c152c39
@ -26,7 +26,6 @@
|
||||
RecoveryWidget::RecoveryWidget(WebView* view, QupZilla* mainClass)
|
||||
: QWidget()
|
||||
, ui(new Ui::RecoveryWidget)
|
||||
, m_restoreManager(mApp->restoreManager())
|
||||
, m_view(view)
|
||||
, p_QupZilla(mainClass)
|
||||
{
|
||||
@ -34,7 +33,7 @@ RecoveryWidget::RecoveryWidget(WebView* view, QupZilla* mainClass)
|
||||
|
||||
setCursor(Qt::ArrowCursor);
|
||||
|
||||
const RestoreData &data = m_restoreManager->restoreData();
|
||||
const RestoreData &data = mApp->restoreManager()->restoreData();
|
||||
|
||||
for (int i = 0; i < data.size(); ++i) {
|
||||
const RestoreManager::WindowData &wd = data.at(i);
|
||||
@ -75,7 +74,12 @@ void RecoveryWidget::onItemChanged(QTreeWidgetItem* item, int column)
|
||||
|
||||
void RecoveryWidget::restoreSession()
|
||||
{
|
||||
RestoreData data = m_restoreManager->restoreData();
|
||||
RestoreManager* manager = mApp->restoreManager();
|
||||
if (!manager) {
|
||||
return;
|
||||
}
|
||||
|
||||
RestoreData data = manager->restoreData();
|
||||
|
||||
for (int win = ui->treeWidget->topLevelItemCount() - 1; win >= 0; --win) {
|
||||
QTreeWidgetItem* root = ui->treeWidget->topLevelItem(win);
|
||||
|
@ -30,7 +30,6 @@ class QTreeWidgetItem;
|
||||
|
||||
class WebView;
|
||||
class QupZilla;
|
||||
class RestoreManager;
|
||||
|
||||
class RecoveryWidget : public QWidget
|
||||
{
|
||||
@ -49,7 +48,6 @@ private slots:
|
||||
private:
|
||||
Ui::RecoveryWidget* ui;
|
||||
|
||||
RestoreManager* m_restoreManager;
|
||||
WebView* m_view;
|
||||
QupZilla* p_QupZilla;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user