OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16c05a6
)
use qVariantToHelper<T>() in QVariant::toBool()
author
Ivailo Monev
<xakepa10@gmail.com>
Sun, 22 Aug 2021 23:42:06 +0000
(
02:42
+0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Sun, 22 Aug 2021 23:42:06 +0000
(
02:42
+0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/kernel/qvariant.cpp
patch
|
blob
|
history
diff --git
a/src/core/kernel/qvariant.cpp
b/src/core/kernel/qvariant.cpp
index
5f06215
..
d7a72a9
100644
(file)
--- a/
src/core/kernel/qvariant.cpp
+++ b/
src/core/kernel/qvariant.cpp
@@
-2396,13
+2396,7
@@
qulonglong QVariant::toULongLong(bool *ok) const
*/
bool QVariant::toBool() const
{
- if (d.type == Bool)
- return d.data.b;
-
- bool res = false;
- handler->convert(&d, Bool, &res, nullptr);
-
- return res;
+ return qVariantToHelper<bool>(d, Bool, handler);
}
/*!