From: Aurelien Jacobs Date: Sat, 24 Oct 2015 20:18:42 +0000 (+0200) Subject: avoid using deprecated std::autoptr X-Git-Tag: pulseview-0.3.0~60 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=db8a1b5c7e7cc3663fa8582749db289383c68313;p=pulseview.git avoid using deprecated std::autoptr This fixes the following g++-5 warning: pv/dialogs/about.hpp:51:7: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] std::auto_ptr supportedDoc; --- diff --git a/pv/dialogs/about.cpp b/pv/dialogs/about.cpp index 28ba92f2..20a02993 100644 --- a/pv/dialogs/about.cpp +++ b/pv/dialogs/about.cpp @@ -99,9 +99,9 @@ About::About(shared_ptr context, QWidget *parent) : s.append(""); - supportedDoc.reset(new QTextDocument(this)); + supportedDoc = new QTextDocument(this); supportedDoc->setHtml(s); - ui->supportList->setDocument(supportedDoc.get()); + ui->supportList->setDocument(supportedDoc); } About::~About() diff --git a/pv/dialogs/about.hpp b/pv/dialogs/about.hpp index 6b6b67b4..1baa6034 100644 --- a/pv/dialogs/about.hpp +++ b/pv/dialogs/about.hpp @@ -48,7 +48,7 @@ public: private: Ui::About *ui; - std::auto_ptr supportedDoc; + QTextDocument *supportedDoc; }; } // namespace dialogs