From: Paul Wolneykien <manowar@altlinux.org> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: [devel] Странности с QT Date: Wed, 02 Nov 2011 23:10:11 +0400 Message-ID: <4EB19593.7000004@altlinux.org> (raw) Всем привет. Вопрос, прежде всего, к специалистам по QT. На днях боролся с неполадками в Scribus (http://bugs.scribus.net/view.php?id=10355). Дело оказалось в преобразовании чисел, а при отладке я обнаружил, как мне кажется, странное поведение QByteArray, QString либо QChar — точно сказать не могу: (gdb) p bb->d->data $1 = 0x8d83fb0 " " (gdb) n 44 bb = bb.insert(0, in.at(3).cell()); (gdb) p bb->d->data $2 = 0x9651068 " \305 " (gdb) n 45 bb = bb.insert(1, in.at(2).cell()); (gdb) p bb->d->data $3 = 0x9651068 " \320 \305 " (gdb) n 46 bb = bb.insert(2, in.at(1).cell()); (gdb) p bb->d->data $4 = 0x9651068 " \323 \320 \305 " (gdb) n 58 bb = bb.insert(3, in.at(0).cell()); (gdb) p bb->d->data $5 = 0x9651068 "\306 \323 \320 \305 " Как видно, в bb добавляются не только байты из входной строки, но и пробелы. Судя по последующему коду (http://clck.ru/OA-n) автор не предполагал их наличия. Проблему я решил, избавившись от использования как insert, так и QString (http://clck.ru/OA0M). Однако интересно, является ли такое поведение insert нормальным? Подумал, вдруг эта проблема затрагивает не только Scribus. Паша.
next reply other threads:[~2011-11-02 19:10 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-11-02 19:10 Paul Wolneykien [this message] 2011-11-02 21:33 ` Hihin Ruslan 2011-11-02 22:44 ` Paul Wolneykien 2011-11-03 4:32 ` Hihin Ruslan 2011-11-03 5:04 ` Sergei Epiphanov 2011-11-03 6:59 ` Damir Shayhutdinov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4EB19593.7000004@altlinux.org \ --to=manowar@altlinux.org \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git