Instead of deciding at build time which backend to use, see which is
used upon construction.
This will make it possible to have an alternative wayland
implementation.
Details
Details
Diff Detail
Diff Detail
- Repository
- R273 KGuiAddons
- Branch
- wayland_keystate
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 10355 Build 10373: arc lint + arc unit
src/util/kmodifierkeyinfo.cpp | ||
---|---|---|
34–44 | You don't need elses, e.g. static KModifierKeyInfoProvider *createProvider() { #ifdef WITH_XCB if (qGuiApp->platformName() == QLatin1String("xcb")) { return new KModifierKeyInfoProviderXcb; } #endif #ifdef WITH_WAYLAND if (qGuiApp->platformName() == QLatin1String("wayland")) { return new KModifierKeyInfoProviderWayland; } #endif return new KModifierKeyInfoProvider; } | |
src/util/kmodifierkeyinfoprovider.cpp | ||
90 | Abuse of auto. | |
92 | Same here. | |
src/util/kmodifierkeyinfoprovider_wayland.cpp | ||
36 | Needs to be a static function instead. | |
38–45 | ||
src/util/kmodifierkeyinfoprovider_wayland.h | ||
29 | Indent it. |
src/util/kmodifierkeyinfoprovider.cpp | ||
---|---|---|
90 | Calling this an "abuse" is very arguable, see https://herbsutter.com/2013/08/12/gotw-94-solution-aaa-style-almost-always-auto/ |
src/util/kmodifierkeyinfoprovider.cpp | ||
---|---|---|
90 | There is a Qt recommendation though: https://wiki.qt.io/Coding_Conventions#auto_Keyword |