Set the desktop file name via `SET_QT_APPLICATION_INFO`
This commit is contained in:
parent
4feedbb057
commit
6016ec4bff
|
@ -16,6 +16,18 @@ QT_FORWARD_DECLARE_CLASS(QSettings)
|
||||||
QT_FORWARD_DECLARE_CLASS(QStringList)
|
QT_FORWARD_DECLARE_CLASS(QStringList)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Sets the base name of the desktop entry for this application from buildsystem-provided meta-data.
|
||||||
|
* \remarks
|
||||||
|
* - This is done as part of SET_QT_APPLICATION_INFO and thus normally doesn't need to be invoked individually.
|
||||||
|
* - This macro is still experimental.
|
||||||
|
*/
|
||||||
|
#define SET_QT_DESKTOP_FILE_NAME
|
||||||
|
#if defined(Q_OS_LINUX) && defined(qGuiApp) && defined(APP_ID)
|
||||||
|
#undef SET_QT_DESKTOP_FILE_NAME
|
||||||
|
#define SET_QT_DESKTOP_FILE_NAME QGuiApplication::setDesktopFileName(QStringLiteral(APP_ID));
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Sets the application meta data in the QCoreApplication singleton and attributes commonly used
|
* \brief Sets the application meta data in the QCoreApplication singleton and attributes commonly used
|
||||||
* within my applications.
|
* within my applications.
|
||||||
|
@ -26,6 +38,7 @@ QT_FORWARD_DECLARE_CLASS(QStringList)
|
||||||
QCoreApplication::setOrganizationDomain(QStringLiteral(APP_DOMAIN)); \
|
QCoreApplication::setOrganizationDomain(QStringLiteral(APP_DOMAIN)); \
|
||||||
QCoreApplication::setApplicationName(QStringLiteral(APP_NAME)); \
|
QCoreApplication::setApplicationName(QStringLiteral(APP_NAME)); \
|
||||||
QCoreApplication::setApplicationVersion(QStringLiteral(APP_VERSION)); \
|
QCoreApplication::setApplicationVersion(QStringLiteral(APP_VERSION)); \
|
||||||
|
SET_QT_DESKTOP_FILE_NAME \
|
||||||
::QtUtilities::setupCommonQtApplicationAttributes()
|
::QtUtilities::setupCommonQtApplicationAttributes()
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue