]> sigrok.org Git - pulseview.git/commitdiff
avoid using deprecated std::autoptr
authorAurelien Jacobs <redacted>
Sat, 24 Oct 2015 20:18:42 +0000 (22:18 +0200)
committerAurelien Jacobs <redacted>
Sat, 24 Oct 2015 21:22:35 +0000 (23:22 +0200)
This fixes the following g++-5 warning:
pv/dialogs/about.hpp:51:7: warning: â€˜template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
  std::auto_ptr<QTextDocument> supportedDoc;

pv/dialogs/about.cpp
pv/dialogs/about.hpp

index 28ba92f2cb48d3fdabb02fd85169b605ed6c2752..20a02993b59cafa1360ea227e7f0de032b9c241f 100644 (file)
@@ -99,9 +99,9 @@ About::About(shared_ptr<Context> context, QWidget *parent) :
 
        s.append("</table>");
 
-       supportedDoc.reset(new QTextDocument(this));
+       supportedDoc = new QTextDocument(this);
        supportedDoc->setHtml(s);
-       ui->supportList->setDocument(supportedDoc.get());
+       ui->supportList->setDocument(supportedDoc);
 }
 
 About::~About()
index 6b6b67b4b64e44da8545e544b78bb72e72541161..1baa60347e3cdba1ba51eb1ec2789d24535df6f7 100644 (file)
@@ -48,7 +48,7 @@ public:
 
 private:
        Ui::About *ui;
-       std::auto_ptr<QTextDocument> supportedDoc;
+       QTextDocument *supportedDoc;
 };
 
 } // namespace dialogs