> On Nov. 16, 2015, 2:08 nachm., Milian Wolff wrote: > > src/klocalizedcontext.cpp, line 53 > > <https://git.reviewboard.kde.org/r/126087/diff/1/?file=417069#file417069line53> > > > > isNull or isEmpty? Don't we usually want to check against isEmpty and > > never against isNull? Isn't the latter even quasi-deprecated as it's > > internal state is somewhat undocumented and one must not depend on it? I > > think I remember something like that from the qt devel mailing list... > > Should ask Thiago again maybe? > > Aleix Pol Gonzalez wrote: > QString::isNull is correct. Qml will give us a null string if the > argument isn't there, AFAIK.
>From what I can see isNull and isEmpty are the same as far as QML is concerned. Q_INVOKABLE void foo(const QString &bar = QString()) foo() - null and empty foo(undefined) - null and empty foo(null) - null and empty foo("") - null and empty foo(" ") - not null and not empty Same when I don't specify a default argument in which case the first call failes on insufficient arguments. On the C++ side it does distinguish between QString() and QString("") - Kai Uwe ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/126087/#review88431 ----------------------------------------------------------- On Nov. 16, 2015, 2:55 nachm., Aleix Pol Gonzalez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/126087/ > ----------------------------------------------------------- > > (Updated Nov. 16, 2015, 2:55 nachm.) > > > Review request for KDE Frameworks, Chusslove Illich and Marco Martin. > > > Repository: ki18n > > > Description > ------- > > The only way to use `i18n*()` so far in QML is by depending on all > KDeclarative. This patch moves the necessary bits there so it can be adopted > by an application or framework just by offering the needed bits within KI18n. > This is done by offering an object with methods that map to the `i18n*()` C++ > counter-parts. > > > Diffs > ----- > > src/klocalizedcontext.cpp PRE-CREATION > src/CMakeLists.txt 818595e > src/klocalizedcontext.h PRE-CREATION > > Diff: https://git.reviewboard.kde.org/r/126087/diff/ > > > Testing > ------- > > Ported KDeclarative, everything still seems to work. > > > Thanks, > > Aleix Pol Gonzalez > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel