X-Git-Url: https://vaikene.ee/gitweb/highlight.css?a=blobdiff_plain;f=src%2Fapps%2FFileFinder%2FGUI%2Fgui.cpp;h=b0531af0ca42db36b7c36d97df721371ebe9dae3;hb=4c0329c5c2690bde28212c89029015a5da4c7e34;hp=e664dd7703d484f06e62890ee6ccc8f73a2f04c9;hpb=c3f12950e16f519639cf987baf4f590abe6a0c2e;p=evaf diff --git a/src/apps/FileFinder/GUI/gui.cpp b/src/apps/FileFinder/GUI/gui.cpp index e664dd7..b0531af 100644 --- a/src/apps/FileFinder/GUI/gui.cpp +++ b/src/apps/FileFinder/GUI/gui.cpp @@ -3,7 +3,7 @@ * @brief GUI for the FileFinder application * @author Enar Vaikene * - * Copyright (c) 2011 Enar Vaikene + * Copyright (c) 2011-2019 Enar Vaikene * * This file is part of the eVaf C++ cross-platform application development framework. * @@ -18,7 +18,6 @@ */ #include "gui.h" -#include "version.h" #include "Engine/iFileFinder" @@ -28,10 +27,9 @@ #include #include -#include +#include VER_EXPORT_VERSION_INFO() -Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, eVaf::FileFinder::GUI::Module) using namespace eVaf; @@ -44,7 +42,7 @@ void FileFinder::GUI::Internal::MainWidget::keyPressEvent(QKeyEvent * e) switch (e->key()) { case Qt::Key_Enter: case Qt::Key_Return: { - QList buttons = qFindChildren(this); + QList buttons = findChildren(); foreach (QPushButton * btn, buttons) { if (btn->isDefault() && btn->isVisible()) { if (btn->isEnabled()) @@ -80,19 +78,19 @@ int const FileFinder::GUI::Module::MaxHistoryItems = 20; FileFinder::GUI::Module::Module() : Plugins::iPlugin() , mReady(false) - , mFinder(0) - , mOpenFileAction(0) - , mOpenDirectoryAction(0) - , mCopyNameAction(0) - , mCopyAllNamesAction(0) - , wMain(0) - , wDirectory(0) - , wRecursive(0) - , wIncludeNames(0) - , wExcludeNames(0) - , wIncludeContent(0) - , wExcludeContent(0) - , wFind(0) + , mFinder(nullptr) + , mOpenFileAction(nullptr) + , mOpenDirectoryAction(nullptr) + , mCopyNameAction(nullptr) + , mCopyAllNamesAction(nullptr) + , wMain(nullptr) + , wDirectory(nullptr) + , wRecursive(nullptr) + , wIncludeNames(nullptr) + , wExcludeNames(nullptr) + , wIncludeContent(nullptr) + , wExcludeContent(nullptr) + , wFind(nullptr) { setObjectName(QString("%1.Module").arg(VER_MODULE_NAME_STR)); @@ -109,13 +107,13 @@ bool FileFinder::GUI::Module::init(QString const & args) Q_UNUSED(args) // Get the iFileFinder interface - EVAF_TEST_X((mFinder = evafQueryInterface("iFileFinder")), "No iFileFinder interface"); + EVAF_TEST_X((mFinder = evafQueryInterface("iFileFinder")), "No iFileFinder interface") connect(mFinder, SIGNAL(found(QString,QString)), this, SLOT(found(QString,QString))); connect(mFinder, SIGNAL(finished(bool)), this, SLOT(finished(bool))); // Get the main window interface and fill it with widgets SdiWindow::iSdiWindow * win = evafQueryInterface("iSdiWindow"); - EVAF_TEST_X(win, "No iSdiWindow interface"); + EVAF_TEST_X(win, "No iSdiWindow interface") // Create the main widget for this window wMain = new Internal::MainWidget; @@ -142,14 +140,14 @@ void FileFinder::GUI::Module::done() { mReady = false; - mFinder = 0; + mFinder = nullptr; /* * Widgets are deleted by the SdiWindow module. We use wMain to track calls to done() without * proper init(). */ if (wMain) { - wMain = 0; + wMain = nullptr; saveHistory(); }