Review Request 121479: Get char limit for the composer from the status.net server
Andrea Scarpino
scarpino at kde.org
Sun Dec 14 09:01:46 UTC 2014
> On Dec. 14, 2014, 9:53 a.m., Mehrdad Momeny wrote:
> > microblogs/laconica/laconicaeditaccount.cpp, line 232
> > <https://git.reviewboard.kde.org/r/121479/diff/1/?file=332960#file332960line232>
> >
> > I undestand that you are reusing the ok param.
> > here is the code I think should be here instead:
> >
> > ```if (ok) {
> > mAccount->setPostCharLimit(siteInfos["textlimit"].toUInt(&ok));
> > }
> >
> > if (!ok) {
> > kDebug() << "Cannot parse text limit value";
> > mAccount->setPostCharLimit(140);
> > }
> > ```
> >
> > Or If you you say it's initialized to 140 in constructor, then the second if is redundant.
> > But I encourage having it this way, so the code is more readable that if the parsing failed in any way, we have the char limit set to 140, instead.
>
> Mehrdad Momeny wrote:
> Oh, I meant instead of the if clause! not the parser.parse() code. :D
Ah, right!
New review in a sec.
- Andrea
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121479/#review71943
-----------------------------------------------------------
On Dec. 13, 2014, 8:07 p.m., Andrea Scarpino wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121479/
> -----------------------------------------------------------
>
> (Updated Dec. 13, 2014, 8:07 p.m.)
>
>
> Review request for Choqok.
>
>
> Bugs: 283298
> http://bugs.kde.org/show_bug.cgi?id=283298
>
>
> Repository: choqok
>
>
> Description
> -------
>
> I reworked #102222.
>
> setCharLimit() has been moved from the MicroBlog to the Account class. It also has been renamed as setPostCharLimit().
>
> I moved the setTextLimit function in the EditAccount widget. The change is then propagated to the ComposerWidget by the modified() signal, which listen on it and redraw the Editor.
>
> Also, the HTTP job result is checked and only when it fails a fixed value (140) is set; unlimited text is allowed then.
>
> Pump.IO account has been updated to the new API.
>
>
> Diffs
> -----
>
> helperlibs/twitterapihelper/twitterapiaccount.cpp e2efe97
> helperlibs/twitterapihelper/twitterapicomposerwidget.cpp 0734115
> helperlibs/twitterapihelper/twitterapidmessagedialog.cpp 70092db
> helperlibs/twitterapihelper/twitterapimicroblog.cpp ff50710
> libchoqok/account.h de56ddf
> libchoqok/account.cpp 7674c52
> libchoqok/microblog.h 4c46199
> libchoqok/microblog.cpp fd9a1f9
> libchoqok/ui/composerwidget.cpp 79603eb
> libchoqok/ui/quickpost.cpp 0d1deb5
> microblogs/laconica/CMakeLists.txt 5516c2b
> microblogs/laconica/laconicacomposerwidget.h 59b354d
> microblogs/laconica/laconicacomposerwidget.cpp 024b9f2
> microblogs/laconica/laconicaeditaccount.h c4a1c90
> microblogs/laconica/laconicaeditaccount.cpp 9ad5470
> microblogs/pumpio/pumpioaccount.cpp 8cf74e4
> microblogs/pumpio/pumpiocomposerwidget.cpp 53a11bc
> microblogs/pumpio/pumpiomicroblog.cpp 98c4009
> microblogs/twitter/twittercomposerwidget.cpp e04a9f7
>
> Diff: https://git.reviewboard.kde.org/r/121479/diff/
>
>
> Testing
> -------
>
> Registered an account on http://social.stopwatchingus-heidelberg.de (which has a limit on 500 chars).
> Counter is correctly set without a restart and it persists after a restart.
>
>
> Thanks,
>
> Andrea Scarpino
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/choqok-devel/attachments/20141214/d339b98d/attachment.html>
More information about the Choqok-devel
mailing list