Compare commits

..

1 Commits

Author SHA1 Message Date
7df446ed15 Update version number for 5.26.0
GIT_SILENT
2022-10-06 12:28:31 +01:00
2 changed files with 5 additions and 18 deletions

View File

@ -4,13 +4,13 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(layershellqt) project(layershellqt)
set(PROJECT_VERSION "5.27.8") set(PROJECT_VERSION "5.26.0")
set(PROJECT_VERSION_MAJOR 5) set(PROJECT_VERSION_MAJOR 5)
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
set(QT_MIN_VERSION "5.15.2") set(QT_MIN_VERSION "5.15.2")
set(KF5_MIN_VERSION "5.102.0") set(KF5_MIN_VERSION "5.98.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82") set(KDE_COMPILERSETTINGS_LEVEL "5.82")
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
@ -23,7 +23,6 @@ include(KDEInstallDirs)
include(KDECMakeSettings) include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMSetupVersion) include(ECMSetupVersion)
include(ECMDeprecationSettings)
include(ECMGenerateHeaders) include(ECMGenerateHeaders)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
include(FeatureSummary) include(FeatureSummary)
@ -31,7 +30,6 @@ include(GenerateExportHeader)
include(KDEClangFormat) include(KDEClangFormat)
include(ECMQtDeclareLoggingCategory) include(ECMQtDeclareLoggingCategory)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml) find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS WaylandClient Qml)
if (QT_MAJOR_VERSION EQUAL "5") if (QT_MAJOR_VERSION EQUAL "5")
find_package(Qt5XkbCommonSupport REQUIRED PRIVATE) find_package(Qt5XkbCommonSupport REQUIRED PRIVATE)
@ -55,15 +53,10 @@ ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX LAYERSHELLQT
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
ecm_set_disabled_deprecation_versions(QT 5.15.2
KF 5.101
)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(tests) add_subdirectory(tests)
set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_CMAKEPACKAGEDIR}/LayerShellQt) set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_LIBDIR}/cmake/LayerShellQt)
install(EXPORT LayerShellQtTargets install(EXPORT LayerShellQtTargets
NAMESPACE LayerShellQt:: NAMESPACE LayerShellQt::
DESTINATION ${CMAKECONFIG_INSTALL_DIR} DESTINATION ${CMAKECONFIG_INSTALL_DIR}

View File

@ -8,7 +8,6 @@
#include <layershellqt_logging.h> #include <layershellqt_logging.h>
#include <QPointer> #include <QPointer>
#include <optional>
using namespace LayerShellQt; using namespace LayerShellQt;
@ -27,7 +26,7 @@ public:
Window::KeyboardInteractivity keyboardInteractivity = Window::KeyboardInteractivityExclusive; Window::KeyboardInteractivity keyboardInteractivity = Window::KeyboardInteractivityExclusive;
Window::Layer layer = Window::LayerTop; Window::Layer layer = Window::LayerTop;
QMargins margins; QMargins margins;
std::optional<QPointer<QScreen>> desiredOutput; QPointer<QScreen> desiredOutput;
}; };
static QMap<QWindow *, Window *> s_map; static QMap<QWindow *, Window *> s_map;
@ -104,12 +103,7 @@ Window::Layer Window::layer() const
QScreen *Window::desiredOutput() const QScreen *Window::desiredOutput() const
{ {
// Don't use .value_or here to avoid a temporary QPointer return d->desiredOutput;
if (d->desiredOutput.has_value()) {
return d->desiredOutput.value();
}
return d->parentWindow->screen();
} }
void Window::setDesiredOutput(QScreen *output) void Window::setDesiredOutput(QScreen *output)