April 7, 2012

Chromatix Chromatix
Lab Rat
10 posts

Questions about QStringBuilder

 

Hello.
In QString’s documentation [qt-project.org], in the section about QStringBuilder it says “There are three ways you can access this improved method of string construction…”, then it explains replacing + by % as one way, defining QT_USE_QSTRINGBUILDER as the second way, and… wait, where is the third way?

Also I was just wondering why QStringBuilder provides an operator%, but doesn’t provide any operator%=? The latter operator would be just as useful of the former. So one doesn’t have to write someQString = someQString % restOfData instead of the neat form someQString %= restOfData.

Another question is why QString doesn’t provide a constructor and operator= accepting QStringBuilder. With it expressions like someQString = InLine % Concat % eNation will become possible.

5 replies

April 7, 2012

Chromatix Chromatix
Lab Rat
10 posts

Since no one has replyed yet, let me clarify this a little. I want to file the above issues as bug reports and feature requests.

Since I am very newer to Qt than most people here, I think I had to ask first to know what do you experts think about this.

The “three reasons” in the documentation is almost surely a documentation bug. However I still want to know the third way.

And do you find any particular reason for QStringBuilder not to implement the above operators? Or the developers just didn’t think about implementing them?

April 7, 2012

koahnig koahnig
Area 51 Engineer
2891 posts

Two things you have to acknowledge.
First we are mostly volunteers answering questions. Only few Trolls are around, but they may have different focus than your question.
Second It is the Easter weekend even some crazy developers are using to take vacations and even away from their computer ;-)

It is always good to raise questions in the forum before torpeding the community with bug reports. A bit patience may be required especially on traditional vacation weekends.
Nevertheless, if you are sure that this is a bug or if you want to place a suggestion, you can file a bug/suggestion report on JIRA [bugreports.qt-project.org]

April 7, 2012

Chromatix Chromatix
Lab Rat
10 posts

Thanks for the tips. :-)
I thought the question was ignored by people because of being “un-smart”. If they are valid questions, i’d like to make the Trolls aware.
I have patience; am not worried. :)

April 8, 2012

koahnig koahnig
Area 51 Engineer
2891 posts
Chromatix wrote:
Thanks for the tips. :-) I thought the question was ignored by people because of being “un-smart”. If they are valid questions, i’d like to make the Trolls aware. I have patience; am not worried. :)

If you like to make sure that your request is not getting lost, a suggestion on JIRA will be finally required. This is the only place monitored and checked for such issues. Here in devnet it may be overseen or forgotten. Especially it does not facilitate progress or any of the other steps required.

April 9, 2012

Andre Andre
Robot Herder
6393 posts

I think it would be best to raise this issue on IRC. Get onto the freenode network, and pop into the @qt-labs channel. That’s where the developers working on Qt itself hang out. There you can discuss if your suggestions are feasible or not. There might be technical reasons for these missing operators, such as the technique used for QStringBuilder not working with these operators… However, a lot of technical insight in how this class actually works interally is needed to answer such questions, and you’ll find a lot more of such knowledge on that channel.

 
  ‹‹ QSortFilterProxyModel over QSqlRelationalTableModel : insertingColumn(s) snippet needed      [Solved] Problem switching between multiple QGLWidgets ››

You must log in to post a reply. Not a member yet? Register here!