From 54eabb28c8eec375c2864ca69f6baa64ff12952d Mon Sep 17 00:00:00 2001 From: Felix Hammer Date: Wed, 14 Jan 2015 01:22:10 +0100 Subject: [PATCH] try to make cppcheck happy --- src/gui/qml/qmlwrapper.cpp | 8 +++++--- src/gui/qml/qmlwrapper.h | 6 ++++++ src/gui/qml/views/startview/startview.cpp | 5 +++++ src/gui/qml/views/startview/startview.h | 1 + src/pokerth.cpp | 3 ++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/gui/qml/qmlwrapper.cpp b/src/gui/qml/qmlwrapper.cpp index 7d3d159b..becbcd53 100644 --- a/src/gui/qml/qmlwrapper.cpp +++ b/src/gui/qml/qmlwrapper.cpp @@ -7,9 +7,7 @@ qmlWrapper::qmlWrapper() { qDebug("qmlWrapperKonstruktor"); - - startView myStartView; - myStartView.show(); + myStartView = new startView(); } qmlWrapper::~qmlWrapper() @@ -17,3 +15,7 @@ qmlWrapper::~qmlWrapper() } +void qmlWrapper::showStartView() +{ + myStartView->show(); +} diff --git a/src/gui/qml/qmlwrapper.h b/src/gui/qml/qmlwrapper.h index 496cea10..62aac25d 100644 --- a/src/gui/qml/qmlwrapper.h +++ b/src/gui/qml/qmlwrapper.h @@ -1,12 +1,18 @@ #ifndef QMLWRAPPER_H #define QMLWRAPPER_H +class startView; class qmlWrapper { public: qmlWrapper(); ~qmlWrapper(); + + void showStartView(); + +private: + startView *myStartView; }; #endif // QMLWRAPPER_H diff --git a/src/gui/qml/views/startview/startview.cpp b/src/gui/qml/views/startview/startview.cpp index dc7b2b28..f1dc4510 100644 --- a/src/gui/qml/views/startview/startview.cpp +++ b/src/gui/qml/views/startview/startview.cpp @@ -12,6 +12,11 @@ startView::~startView() } +startView::startView(const startView&) +{ + +} + void startView::show() { qDebug("show mal bitte"); diff --git a/src/gui/qml/views/startview/startview.h b/src/gui/qml/views/startview/startview.h index ca39b3fe..3692f545 100644 --- a/src/gui/qml/views/startview/startview.h +++ b/src/gui/qml/views/startview/startview.h @@ -7,6 +7,7 @@ class startView public: startView(); ~startView(); + startView(const startView&); void show(); diff --git a/src/pokerth.cpp b/src/pokerth.cpp index 48fccbf5..2c18d25f 100755 --- a/src/pokerth.cpp +++ b/src/pokerth.cpp @@ -37,7 +37,8 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - qmlWrapper *myQml = new qmlWrapper(); + qmlWrapper myQml; + myQml.showStartView(); return app.exec(); }