Verified Commit e177f7b5 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

effects/overview: Implement the searchText backing property

It is used in QML code, just like in windowview (Present Windows)
effect, but developers forgot to copy the implementation in C++
backend.

BUG: 459202
FIXED-IN: 5.26
(cherry picked from commit de6c0289)
parent 31c4c2c3
......@@ -236,6 +236,7 @@ void OverviewEffect::activate()
setPartialActivationFactor(0.0);
// This one should be the last.
m_searchText = QString();
setRunning(true);
}
......@@ -251,6 +252,7 @@ void OverviewEffect::partialActivate(qreal factor)
setGestureInProgress(true);
// This one should be the last.
m_searchText = QString();
setRunning(true);
}
......
......@@ -21,6 +21,7 @@ class OverviewEffect : public QuickSceneEffect
Q_PROPERTY(qreal partialActivationFactor READ partialActivationFactor NOTIFY partialActivationFactorChanged)
// More efficient from a property binding pov rather than binding to partialActivationFactor !== 0
Q_PROPERTY(bool gestureInProgress READ gestureInProgress NOTIFY gestureInProgressChanged)
Q_PROPERTY(QString searchText MEMBER m_searchText NOTIFY searchTextChanged)
public:
enum class Status {
......@@ -61,6 +62,7 @@ Q_SIGNALS:
void partialActivationFactorChanged();
void gestureInProgressChanged();
void ignoreMinimizedChanged();
void searchTextChanged();
public Q_SLOTS:
void activate();
......@@ -84,9 +86,10 @@ private:
QList<QKeySequence> m_toggleShortcut;
QList<ElectricBorder> m_borderActivate;
QList<ElectricBorder> m_touchBorderActivate;
QString m_searchText;
Status m_status = Status::Inactive;
qreal m_partialActivationFactor = 0;
bool m_blurBackground = false;
Status m_status = Status::Inactive;
int m_animationDuration = 400;
int m_layout = 1;
bool m_gestureInProgress = false;
......
......@@ -335,7 +335,7 @@ void WindowViewEffect::activate(const QStringList &windowIds)
}
if (!internalIds.isEmpty()) {
m_windowIds = internalIds;
m_searchText = "";
m_searchText = QString();
setRunning(true);
}
}
......@@ -353,7 +353,7 @@ void WindowViewEffect::activate()
setPartialActivationFactor(0);
// This one should be the last.
m_searchText = "";
m_searchText = QString();
setRunning(true);
}
......@@ -369,7 +369,7 @@ void WindowViewEffect::partialActivate(qreal factor)
setGestureInProgress(true);
// This one should be the last.
m_searchText = "";
m_searchText = QString();
setRunning(true);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment