| 4 | #include "WebWidget.h" |
| 5 | |
| 6 | WebState::WebState(WebWidget *webWidget, BrowserTabWidget *tabWidget) : |
| 7 | index(0), |
| 8 | isPinned(false), |
| 9 | icon(webWidget->getIcon()), |
| 10 | iconUrl(webWidget->getIconUrl()), |
| 11 | title(webWidget->getTitle()), |
| 12 | url(webWidget->url()), |
| 13 | pageHistory() |
| 14 | { |
| 15 | if (tabWidget != nullptr) |
| 16 | { |
| 17 | index = tabWidget->indexOf(webWidget); |
| 18 | isPinned = tabWidget->isTabPinned(index); |
| 19 | |
| 20 | if (icon.isNull()) |
| 21 | icon = tabWidget->tabIcon(index); |
| 22 | } |
| 23 | |
| 24 | if (WebHistory *history = webWidget->getHistory()) |
| 25 | pageHistory = history->save(); |
| 26 | } |
| 27 | |
| 28 | WebState::WebState(WebState &&other) noexcept : |
| 29 | index(other.index), |
nothing calls this directly
no test coverage detected