Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
|
9f5261bac8 | |
|
82af8b06ea | |
|
11d139f53d | |
|
6016ec4bff | |
|
4feedbb057 |
|
@ -10,7 +10,7 @@ set(META_APP_DESCRIPTION
|
|||
"Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models")
|
||||
set(META_VERSION_MAJOR 6)
|
||||
set(META_VERSION_MINOR 14)
|
||||
set(META_VERSION_PATCH 0)
|
||||
set(META_VERSION_PATCH 2)
|
||||
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
|
||||
|
||||
project(${META_PROJECT_NAME})
|
||||
|
|
|
@ -159,6 +159,18 @@ if (STATIC_LINKAGE OR QT_TARGET_TYPE STREQUAL STATIC_LIBRARY)
|
|||
CocoaIntegration
|
||||
ONLY_PLUGINS)
|
||||
endif ()
|
||||
if (EMSCRIPTEN AND TARGET "${QT_PACKAGE_PREFIX}::QWasmIntegrationPlugin")
|
||||
use_qt_module(
|
||||
LIBRARIES_VARIABLE
|
||||
"${QT_PLUGINS_LIBRARIES_VARIABLE}"
|
||||
PREFIX
|
||||
"${QT_PACKAGE_PREFIX}"
|
||||
MODULE
|
||||
Gui
|
||||
PLUGINS
|
||||
WasmIntegration
|
||||
ONLY_PLUGINS)
|
||||
endif ()
|
||||
if (UNIX AND TARGET "${QT_PACKAGE_PREFIX}::QOffscreenIntegrationPlugin")
|
||||
use_qt_module(
|
||||
LIBRARIES_VARIABLE
|
||||
|
|
|
@ -88,6 +88,10 @@ QMetaObject::Connection onDarkModeChanged(std::function<void(bool)> &&darkModeCh
|
|||
return QObject::connect(styleHints, &QStyleHints::colorSchemeChanged, context,
|
||||
[handler = std::move(darkModeChangedCallback)](Qt::ColorScheme colorScheme) { return handler(colorScheme == Qt::ColorScheme::Dark); });
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(darkModeChangedCallback)
|
||||
Q_UNUSED(context)
|
||||
Q_UNUSED(invokeImmediately)
|
||||
#endif
|
||||
return QMetaObject::Connection();
|
||||
}
|
||||
|
|
|
@ -16,6 +16,18 @@ QT_FORWARD_DECLARE_CLASS(QSettings)
|
|||
QT_FORWARD_DECLARE_CLASS(QStringList)
|
||||
#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
|
||||
* within my applications.
|
||||
|
@ -26,6 +38,7 @@ QT_FORWARD_DECLARE_CLASS(QStringList)
|
|||
QCoreApplication::setOrganizationDomain(QStringLiteral(APP_DOMAIN)); \
|
||||
QCoreApplication::setApplicationName(QStringLiteral(APP_NAME)); \
|
||||
QCoreApplication::setApplicationVersion(QStringLiteral(APP_VERSION)); \
|
||||
SET_QT_DESKTOP_FILE_NAME \
|
||||
::QtUtilities::setupCommonQtApplicationAttributes()
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue