From 790a1797eb43aa063240de829f5a34b4a7c86753 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 17 Oct 2013 13:15:02 +0300 Subject: Fix minimal examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib02f1d361164e5ba983c7843a538273165e034da Reviewed-by: Tomi Korpipää --- .../doc/snippets/doc_src_q3dbars_construction.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp') diff --git a/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp b/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp index a5615601..7c47183c 100644 --- a/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp +++ b/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp @@ -26,19 +26,19 @@ int main(int argc, char **argv) QGuiApplication app(argc, argv); //! [4] - Q3DBars *bars = new Q3DBars(); + Q3DBars bars; //! [4] //! [0] - bars->rowAxis()->setRange(0, 4); - bars->columnAxis()->setRange(0, 4); + bars.rowAxis()->setRange(0, 4); + bars.columnAxis()->setRange(0, 4); //! [0] //! [1] - QBarDataRow data; - data << 1.0 << 3.0 << 7.5 << 5.0 << 2.2; - bars->activeDataProxy()->addRow(&data); + QBarDataRow *data = new QBarDataRow; + *data << 1.0 << 3.0 << 7.5 << 5.0 << 2.2; + bars.activeDataProxy()->addRow(data); //! [1] //! [2] - bars->show(); + bars.show(); //! [2] return app.exec(); -- cgit v1.2.3