mirror of https://github.com/buggins/dlangui.git
ldc build fix-2
This commit is contained in:
parent
0984376266
commit
02d8833cda
|
@ -1406,7 +1406,7 @@ class StringListWidget : ListWidget {
|
|||
version(DigitalMars) {
|
||||
import std.datetime.stopwatch : StopWatch;
|
||||
} else {
|
||||
import std.datetime : StopWatch;
|
||||
import std.datetime : dto = to, StopWatch;
|
||||
}
|
||||
import core.time : dur;
|
||||
private dstring _searchString;
|
||||
|
@ -1485,10 +1485,15 @@ class StringListWidget : ListWidget {
|
|||
if (event.action == KeyAction.Text) {
|
||||
if ( !_stopWatch.running) { _stopWatch.start; }
|
||||
|
||||
auto timePassed = _stopWatch.peek; //.to!("seconds", float)(); // dtop is std.datetime.to
|
||||
version(DigitalMars) {
|
||||
auto timePassed = _stopWatch.peek; //.to!("seconds", float)(); // dtop is std.datetime.to
|
||||
|
||||
if (timePassed > dur!"msecs"(500))
|
||||
_searchString = ""d;
|
||||
if (timePassed > dur!"msecs"(500)) _searchString = ""d;
|
||||
} else {
|
||||
auto timePassed = _stopWatch.peek.dto!("seconds", float)(); // dtop is std.datetime.to
|
||||
|
||||
if (timePassed > 0.5) _searchString = ""d;
|
||||
}
|
||||
_searchString ~= to!dchar(event.text.toUTF8);
|
||||
_stopWatch.reset;
|
||||
|
||||
|
|
Loading…
Reference in New Issue