| 2222 | } |
| 2223 | |
| 2224 | Document::Document(QWidget *widget) |
| 2225 | : QObject(nullptr) |
| 2226 | , d(new DocumentPrivate(this)) |
| 2227 | { |
| 2228 | d->m_widget = widget; |
| 2229 | d->m_bookmarkManager = new BookmarkManager(d); |
| 2230 | d->m_viewportIterator = d->m_viewportHistory.insert(d->m_viewportHistory.end(), DocumentViewport()); |
| 2231 | d->m_undoStack = new QUndoStack(this); |
| 2232 | |
| 2233 | connect(SettingsCore::self(), &SettingsCore::configChanged, this, [this] { d->_o_configChanged(); }); |
| 2234 | connect(d->m_undoStack, &QUndoStack::canUndoChanged, this, &Document::canUndoChanged); |
| 2235 | connect(d->m_undoStack, &QUndoStack::canRedoChanged, this, &Document::canRedoChanged); |
| 2236 | connect(d->m_undoStack, &QUndoStack::cleanChanged, this, &Document::undoHistoryCleanChanged); |
| 2237 | |
| 2238 | qRegisterMetaType<Okular::FontInfo>(); |
| 2239 | } |
| 2240 | |
| 2241 | Document::~Document() |
| 2242 | { |
nothing calls this directly
no test coverage detected