Optimize calls.

This commit is contained in:
Roman Telezhynskyi 2021-06-23 15:58:43 +03:00
parent 3c27c3ee46
commit f5a5fadc52
2 changed files with 17 additions and 17 deletions

View File

@ -197,17 +197,6 @@ void VAbstractApplication::WinAttachConsole()
} }
#endif #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) void VAbstractApplication::LoadTranslation(const QString &locale)
{ {
@ -326,9 +315,3 @@ QFileDialog::Options VAbstractApplication::NativeFileDialog(QFileDialog::Options
return options; return options;
} }
//---------------------------------------------------------------------------------------------------------------------
auto VAbstractApplication::VApp() -> VAbstractApplication *
{
return qobject_cast<VAbstractApplication*>(QCoreApplication::instance());
}

View File

@ -120,4 +120,21 @@ inline QString VAbstractApplication::LocaleToString(const T &value)
return loc.toString(value); return loc.toString(value);
} }
//---------------------------------------------------------------------------------------------------------------------
inline auto VAbstractApplication::VApp() -> VAbstractApplication *
{
return qobject_cast<VAbstractApplication*>(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 #endif // VABSTRACTAPPLICATION_H