From: Enar Vaikene Date: Sat, 31 Aug 2019 05:21:13 +0000 (+0300) Subject: Minor changes X-Git-Url: https://vaikene.ee/gitweb/index.html?a=commitdiff_plain;h=13dedf19c628b9967e4c4106ab0fd967f1df0b90;p=evaf Minor changes --- diff --git a/src/libs/Common/app.cpp b/src/libs/Common/app.cpp index f6668d9..b907a4b 100644 --- a/src/libs/Common/app.cpp +++ b/src/libs/Common/app.cpp @@ -295,7 +295,7 @@ QString const App::xmlFileName() const int App::exec() { setReady(true); - int rval = QCoreApplication::exec(); + int const rval = QCoreApplication::exec(); setReady(false); return rval; } diff --git a/src/main/CLI/main.cpp b/src/main/CLI/main.cpp index c795bba..0be3f36 100644 --- a/src/main/CLI/main.cpp +++ b/src/main/CLI/main.cpp @@ -265,7 +265,7 @@ int main(int argc, char ** argv) // The main run loop bool quit = false; - int rval; + int rval = 0; while (!quit) { EVAF_INFO("%s is starting up", VER_MODULE_NAME_STR); diff --git a/src/plugins/LogView/factory.cpp b/src/plugins/LogView/factory.cpp index 52a7773..27372fd 100644 --- a/src/plugins/LogView/factory.cpp +++ b/src/plugins/LogView/factory.cpp @@ -33,7 +33,7 @@ VER_EXPORT_VERSION_INFO() Factory::Factory() : Plugins::iPluginFactory() - , mPlugin(0) + , mPlugin(nullptr) { setObjectName(QString("%1-Factory").arg(VER_MODULE_NAME_STR)); @@ -52,7 +52,7 @@ QObject * Factory::create(QString const & name) { Q_UNUSED(name); - if (mPlugin == 0) + if (mPlugin == nullptr) mPlugin = new Internal::Module; return mPlugin; } diff --git a/src/plugins/LogView/logview.h b/src/plugins/LogView/logview.h index dd76858..e652f61 100644 --- a/src/plugins/LogView/logview.h +++ b/src/plugins/LogView/logview.h @@ -79,11 +79,11 @@ public: QString where; }; - Model(QObject * parent = 0); + Model(QObject * parent = nullptr); Message const & messageAt(int idx) const { return mData.at(idx); } - virtual int rowCount(QModelIndex const & parent = QModelIndex()) const { return mData.size(); } + virtual int rowCount(QModelIndex const & = QModelIndex()) const { return mData.size(); } virtual QVariant data(QModelIndex const & index, int role = Qt::DisplayRole) const; @@ -135,7 +135,7 @@ class Widget : public QWidget public: - Widget(QString const & source, QWidget * parent = 0); + Widget(QString const & source, QWidget * parent = nullptr); QString const & source() const { return mSource; } @@ -178,7 +178,7 @@ class Window : public Gui::Panel public: - Window(QString const & args, QWidget * parent = 0, Qt::WindowFlags flags = 0); + Window(QString const & args, QWidget * parent = nullptr, Qt::WindowFlags flags = 0); virtual ~Window(); @@ -226,7 +226,7 @@ public: virtual void done(); - virtual bool isReady() const { return wWindow != 0; } + virtual bool isReady() const { return wWindow != nullptr; } private: // Members