diff options
-rw-r--r-- | src/bookwidget.cpp | 22 | ||||
-rw-r--r-- | src/bookwidget.h | 8 | ||||
-rw-r--r-- | src/renderer.h | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/bookwidget.cpp b/src/bookwidget.cpp index e62652e..c5b462b 100644 --- a/src/bookwidget.cpp +++ b/src/bookwidget.cpp @@ -366,9 +366,9 @@ void BookWidget::loadLine() //setup and show firstPage(); //clean up - m_progressDlg.reset(0); - m_stream.reset(0); - m_textLines.reset(0); + m_progressDlg.reset(); + m_stream.reset(); + m_textLines.reset(); m_file.close(); m_modified = true; emit loadingFinished(); @@ -379,14 +379,14 @@ void BookWidget::cancelLoading() m_timer.stop(); if (parentWidget()) parentWidget()->setCaption(""); - //clean up - m_progressDlg->hide(); - m_stream.reset(0); - m_textLines.reset(0); - m_file.close(); - //setup and show - m_renderer->clear(); - firstPage(); + //clean up + m_progressDlg->hide(); + m_stream.reset(); + m_textLines.reset(); + m_file.close(); + //setup and show + m_renderer->clear(); + firstPage(); } void BookWidget::setParaOffset(int offset) diff --git a/src/bookwidget.h b/src/bookwidget.h index d2a41dc..2e4cb74 100644 --- a/src/bookwidget.h +++ b/src/bookwidget.h @@ -116,10 +116,10 @@ private: TQTimer m_timer; TQStringList m_encodings; int m_encoding; - std::auto_ptr<Renderer> m_renderer; - std::auto_ptr<TQTextStream> m_stream; - std::auto_ptr<TQStringList> m_textLines; - std::auto_ptr<KProgressDialog> m_progressDlg; + std::unique_ptr<Renderer> m_renderer; + std::unique_ptr<TQTextStream> m_stream; + std::unique_ptr<TQStringList> m_textLines; + std::unique_ptr<KProgressDialog> m_progressDlg; Bookmarks m_bookmarks; }; diff --git a/src/renderer.h b/src/renderer.h index d2769b2..49fa0f3 100644 --- a/src/renderer.h +++ b/src/renderer.h @@ -128,7 +128,7 @@ private: int m_linesPerPage; int m_paraOffset; TQFont m_font; - std::auto_ptr<TQFontMetrics> m_fontMetrics; + std::unique_ptr<TQFontMetrics> m_fontMetrics; TQSize m_pageSize; bool m_isStartAdded; TIndex m_curParagraph; |