1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

[Crash Fix:] Startup crash without restoring session

This commit is contained in:
nowrep 2011-03-04 15:14:35 +01:00
parent 32d3812cda
commit 7ca0e81184
2 changed files with 4 additions and 4 deletions

View File

@ -96,8 +96,8 @@ public:
void showInspector();
void setBackground(QColor textColor);
inline WebView* weView() const { return qobject_cast<WebTab*>(m_tabWidget->widget(m_tabWidget->currentIndex()))->view(); }
inline WebView* weView(int index) const { return qobject_cast<WebTab*>(m_tabWidget->widget(index))->view(); }
inline WebView* weView() const { WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(m_tabWidget->currentIndex())); if (!webTab) return 0; return webTab->view(); }
inline WebView* weView(int index) const { WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(index)); if (!webTab) return 0; return webTab->view(); }
inline LocationBar* locationBar(){ return m_locationBar; }
inline TabWidget* tabWidget(){ return m_tabWidget; }
inline BookmarksToolbar* bookmarksToolbar(){ return m_bookmarksToolbar; }

View File

@ -68,8 +68,8 @@ private slots:
void actionChangeIndex();
private:
inline WebView* weView() { return qobject_cast<WebTab*>(widget(currentIndex()))->view(); }
inline WebView* weView(int index) { return qobject_cast<WebTab*>(widget(index))->view(); }
inline WebView* weView() { WebTab* webTab = qobject_cast<WebTab*>(widget(currentIndex())); if (!webTab) return 0; return webTab->view(); }
inline WebView* weView(int index) { WebTab* webTab = qobject_cast<WebTab*>(widget(index)); if (!webTab) return 0; return webTab->view(); }
bool m_hideCloseButtonWithOneTab;
bool m_hideTabBarWithOneTab;