From f5a5fadc527abce63d2d139a7282d251b337a11a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 23 Jun 2021 15:58:43 +0300 Subject: [PATCH] Optimize calls. --- src/libs/vmisc/vabstractapplication.cpp | 17 ----------------- src/libs/vmisc/vabstractapplication.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index b64817bab..fdd06d088 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -197,17 +197,6 @@ void VAbstractApplication::WinAttachConsole() } #endif -//--------------------------------------------------------------------------------------------------------------------- -/** - * @brief getSettings hide settings constructor. - * @return pointer to class for acssesing to settings in ini file. - */ -VCommonSettings *VAbstractApplication::Settings() -{ - SCASSERT(settings != nullptr) - return settings; -} - //--------------------------------------------------------------------------------------------------------------------- void VAbstractApplication::LoadTranslation(const QString &locale) { @@ -326,9 +315,3 @@ QFileDialog::Options VAbstractApplication::NativeFileDialog(QFileDialog::Options return options; } - -//--------------------------------------------------------------------------------------------------------------------- -auto VAbstractApplication::VApp() -> VAbstractApplication * -{ - return qobject_cast(QCoreApplication::instance()); -} diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index 12f5167c9..9ee262655 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -120,4 +120,21 @@ inline QString VAbstractApplication::LocaleToString(const T &value) return loc.toString(value); } +//--------------------------------------------------------------------------------------------------------------------- +inline auto VAbstractApplication::VApp() -> VAbstractApplication * +{ + return qobject_cast(QCoreApplication::instance()); +} + +//--------------------------------------------------------------------------------------------------------------------- +/** + * @brief getSettings hide settings constructor. + * @return pointer to class for acssesing to settings in ini file. + */ +inline VCommonSettings *VAbstractApplication::Settings() +{ + SCASSERT(settings != nullptr) + return settings; +} + #endif // VABSTRACTAPPLICATION_H