[effects/cube] Change type of the rotationDuration property to int

Summary:
Currently, type of the rotationDuration is std::chrono::milliseconds.
std::chrono::milliseconds is an unregistered datatype so we can't really
use it with Q_PROPERTY.

Test Plan: Ran `qdbus org.kde.KWin /KWin supportInformation`.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13839
This commit is contained in:
Vlad Zagorodniy 2018-07-02 11:31:20 +03:00
parent a453925306
commit a1e76b4802

View file

@ -41,7 +41,7 @@ class CubeEffect
Q_PROPERTY(bool opacityDesktopOnly READ isOpacityDesktopOnly)
Q_PROPERTY(bool displayDesktopName READ isDisplayDesktopName)
Q_PROPERTY(bool reflection READ isReflection)
Q_PROPERTY(std::chrono::milliseconds rotationDuration READ configuredRotationDuration)
Q_PROPERTY(int rotationDuration READ configuredRotationDuration)
Q_PROPERTY(QColor backgroundColor READ configuredBackgroundColor)
Q_PROPERTY(QColor capColor READ configuredCapColor)
Q_PROPERTY(bool paintCaps READ isPaintCaps)
@ -92,8 +92,8 @@ public:
bool isReflection() const {
return reflection;
}
std::chrono::milliseconds configuredRotationDuration() const {
return rotationDuration;
int configuredRotationDuration() const {
return rotationDuration.count();
}
QColor configuredBackgroundColor() const {
return backgroundColor;