Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akregator
Commits
d49f156d
Commit
d49f156d
authored
Jun 15, 2021
by
Laurent Montel
😁
Browse files
Use std::chrono_literals here
parent
0ef9ef22
Pipeline
#65970
passed with stage
in 8 minutes and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/searchbar.cpp
View file @
d49f156d
...
...
@@ -17,6 +17,9 @@
#include <QHBoxLayout>
#include <QStandardPaths>
#include <QString>
#include <chrono>
using
namespace
std
::
chrono_literals
;
using
namespace
Akregator
;
using
namespace
Akregator
::
Filters
;
...
...
@@ -40,7 +43,7 @@ SearchBar::SearchBar(QWidget *parent)
connect
(
m_searchLine
,
&
StatusSearchLine
::
forceLostFocus
,
this
,
&
SearchBar
::
forceLostFocus
);
connect
(
m_searchLine
,
&
StatusSearchLine
::
statusChanged
,
this
,
&
SearchBar
::
slotStatusChanged
);
connect
(
&
(
m_timer
)
,
&
QTimer
::
timeout
,
this
,
&
SearchBar
::
slotActivateSearch
);
connect
(
&
m_timer
,
&
QTimer
::
timeout
,
this
,
&
SearchBar
::
slotActivateSearch
);
m_timer
.
setSingleShot
(
true
);
}
...
...
@@ -131,6 +134,7 @@ void SearchBar::slotActivateSearch()
QVector
<
Criterion
>
statusCriteria
;
if
(
!
m_searchText
.
isEmpty
())
{
textCriteria
.
reserve
(
3
);
Criterion
subjCrit
(
Criterion
::
Title
,
Criterion
::
Contains
,
m_searchText
);
textCriteria
<<
subjCrit
;
Criterion
crit1
(
Criterion
::
Description
,
Criterion
::
Contains
,
m_searchText
);
...
...
@@ -180,5 +184,5 @@ void Akregator::SearchBar::triggerTimer()
m_timer
.
stop
();
}
m_timer
.
start
(
200
);
m_timer
.
start
(
200
ms
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment