D29772: Don't compare string with empty string
Kai Uwe Broulik
noreply at phabricator.kde.org
Fri May 15 15:54:24 BST 2020
broulik added inline comments.
INLINE COMMENTS
> iasensio wrote in FileDialogLoader.qml:49
> This seems to break importing files for me.
> Checking `lenght > 0` also didn't work, just old `if (fileUrl != "")`.
If `fileUrl` is a `QUrl`, then that can lead to funky results as `url` basic type isn't `astring`. So `fileUrl != ""` it is (not the strict operator).. or `fileUrl.toString() !== ""`
> iasensio wrote in FileDialogLoader.qml:39
> I also didn't know that about JS. Python operators also behave that way. Nice!
There's also `??` operator in Qt 5.15 which is the proper Null coalescing operator
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D29772
To: ognarb, #plasma, iasensio
Cc: broulik, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200515/354f5a0f/attachment-0001.htm>
More information about the kwin
mailing list