Re: [Development] Removing QBool?

2012-01-06 Thread Thiago Macieira
On Saturday, 7 de January de 2012 01.03.50, David Faure wrote: > Shouldn't we clean that up for Qt5 and just use a bool for the contains > method again? The Qt4 API ensures that nobody still has if (contains()==2) > in their code anyway. I think it should be gone. For the few methods where a boo

Re: [Development] Feature freeze date?

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 22.10.53, lars.kn...@nokia.com wrote: > True, unless we decide to set the defines for QtWidgets. But you're right, > it would be a lot better to get them out and move the code into a platform > plugin. I'm not sure having the defines in QtWidgets would help in all c

[Development] Removing QBool?

2012-01-06 Thread David Faure
QBool was introduced in Qt4 because qt3 had "int contains(...)" so there was a need for a compile error when writing (if contains(...) == 2). But it surprises people, e.g. this code doesn't compile: QSettings::setValue("foo", qstringlist.contains("bar")); And I've seen customer code using QBoo

Re: [Development] Feature freeze date?

2012-01-06 Thread lars.knoll
On 1/6/12 8:08 PM, "ext Thiago Macieira" wrote: >On Friday, 6 de January de 2012 15.45.13, lars.kn...@nokia.com wrote: >> >- Go over the modules and factor out platform stuff like: >> > >> >#if defined(Q_WS_WIN) >> > >> > SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0); >> >

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 21.27.20, David Faure wrote: > Exception handling is a new argument though. But doesn't the current QFile > have the exact same issue then? You start writing, throw an exception, dtor > calls close, there you go. The use of an internal temporary file doesn't > change

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 21.38.19, David Faure wrote: > > The first solution doesn't look nice. It would have to fail opening > > completely. > > Well, this is just like using ReadOnly | Truncate, for instance. These are > incompatible. What happens? Truncate will be ignored, and you don't e

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 17.22.18, Artur Souza (MoRpHeUz) wrote: > > If the app crashes at any other point, i.e. after close(), and then the > > 'target' file is the one you want to open anyway. > > > > The saving happens into the temp file. So there is nothing "to restore" in > > case of a

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Robin Burchell
On Fri, Jan 6, 2012 at 9:38 PM, David Faure wrote: > It could even add an unnecessary need for casting, I could imagine: a public > method takes a QFile, then you realize it should handle disk-full situations > better, so you pass it a QSaveFile and you have to downcast it internally to > call rol

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread David Faure
On Friday 06 January 2012 17:11:29 Thiago Macieira wrote: > On Friday, 6 de January de 2012 18.34.21, David Faure wrote: > > On Thursday 05 January 2012 22:38:37 Thiago Macieira wrote: > > > What happens if you open the file in read or read-write mode while the > > > flag > > > is on? > > > > I th

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread David Faure
On Friday 06 January 2012 11:41:05 =?ISO-8859-1?Q?Jo=E3o?= Abecasis wrote: > > Solution 2: how about making this functionality part of QFile itself? > > No need to "port to another class" anymore, just enable the safety > > feature by calling file.setUseTemporaryFile(true). This is what I've > > s

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Artur Souza (MoRpHeUz)
On Fri, Jan 6, 2012 at 4:39 PM, David Faure wrote: > If the app crashes between open and close, i.e. in the middle of the writing > -- then what you want to open in your text editor, is the existing untouched > (older) version of the file, NOT the half-written temp file. "I'm sold" :) > If the a

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread David Faure
On Friday 06 January 2012 14:43:30 Artur Souza (MoRpHeUz) wrote: > On Fri, Jan 6, 2012 at 2:36 PM, David Faure wrote: > > No, no, the whole idea of this feature is not to use the temp file as a > > backup. If the app crashes, you lose your partially-writen temporary > > file. That's fine, it was p

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 18.34.21, David Faure wrote: > On Thursday 05 January 2012 22:38:37 Thiago Macieira wrote: > > What happens if you open the file in read or read-write mode while the > > flag > > is on? > > I think that should just ignore the request for a temp file, since it cannot

Re: [Development] Feature freeze date?

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 15.45.13, lars.kn...@nokia.com wrote: > >- Go over the modules and factor out platform stuff like: > > > >#if defined(Q_WS_WIN) > > > > SystemParametersInfo(SPI_GETDROPSHADOW, 0, &shadow, 0); > > shadowWidth = shadow ? 0 : 6; > > > > } > > > >#els

Re: [Development] API review for a new QDnsResolver class

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 18.46.16, Jeremy =?ISO-8859-1?Q?Lainé?wrote: > > - finalise the class name (I think QDns was suggested) > > Could we get this point settled once and for all? My suggestions: > > - QDnsLookup (my preferred one, as the object represents a lookup and its > result) Go f

Re: [Development] API review for a new QDnsResolver class

2012-01-06 Thread Jeremy Lainé
> - finalise the class name (I think QDns was suggested) > Could we get this point settled once and for all? My suggestions: - QDnsLookup (my preferred one, as the object represents a lookup and its result) - QDnsInfo (similar to QHostInfo) - QDns Jeremy ___

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Artur Souza (MoRpHeUz)
On Fri, Jan 6, 2012 at 2:36 PM, David Faure wrote: > No, no, the whole idea of this feature is not to use the temp file as a > backup. > If the app crashes, you lose your partially-writen temporary file. > That's fine, it was partial anyway, why would you want to use it? > > I think you're confus

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread David Faure
On Friday 06 January 2012 09:50:14 Artur Souza (MoRpHeUz) wrote: > On Thu, Jan 5, 2012 at 8:32 PM, David Faure wrote: > > Now there's just one question remaining: even if the rule is that all > > operations apply to the temp file, between open and close... what should > > QFile::fileName() return?

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread David Faure
On Thursday 05 January 2012 22:38:37 Thiago Macieira wrote: > On Thursday, 5 de January de 2012 22.48.32, David Faure wrote: > > Solution 2: how about making this functionality part of QFile itself? > > No need to "port to another class" anymore, just enable the safety feature > > by calling file.

Re: [Development] QRegularExpression -- first round of API review

2012-01-06 Thread Giuseppe D'Angelo
Hi, following w00t's suggestion, I've started to publish some code on gerrit: (it took more to refactor after removing UTF-8, rather than doing it right the first time... that's life). It's still a WIP, and many things are still mis

Re: [Development] Qt 5 feature freeze

2012-01-06 Thread Stephen Kelly
On Friday, January 06, 2012 15:41:19 lars.kn...@nokia.com wrote: > This gives us both an incremental way to test the features, and one well > defined time where we merge them all into master. Great, sounds good to me. Thanks, -- Stephen Kelly | Software Engineer KDAB (Deutschland) GmbH & Co.KG

Re: [Development] Feature freeze date?

2012-01-06 Thread lars.knoll
On 1/6/12 1:59 PM, "ext Friedemann Kleint" wrote: >Hi, > > > The QtWidgets part of it, at least, is feature-parity with Qt 4, so >it's technically not a *new* feature. It does, however, mean that you'll >have less time to stabilise the code >compared to the rest of Qt. And I >do expect this to be

Re: [Development] Qt 5 feature freeze

2012-01-06 Thread lars.knoll
On 1/6/12 8:32 AM, "ext Stephen Kelly" wrote: >On Thursday, January 05, 2012 10:04:38 lars.kn...@nokia.com wrote: >> We have around a month left until Feb 4th, the date I would like to >>start >> with a feature freeze for Qt 5, and it's high time we get some more >> structure behind things to see

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Oswald Buddenhagen
On Fri, Jan 06, 2012 at 12:53:27PM +, ext shane.kea...@accenture.com wrote: > > the mode is inherently incompatible with read-write without truncate. > > Not necessarily, it could make sense to copy the original file to the > temporary file in this case. > i don't think we want that much abst

Re: [Development] sizeHint for QAbstractScrollArea, especially item views

2012-01-06 Thread jan-arve.saether
Hi, I agree that the current behavior is sometimes not optimal, but I'm not sure if this is such a good idea. With regards to behavior it has some advantages, but I believe it also has some disadvantages. And since in addition it might introduce a performance penalty I'm leaning towards that t

Re: [Development] Feature freeze date?

2012-01-06 Thread Friedemann Kleint
Hi, > The QtWidgets part of it, at least, is feature-parity with Qt 4, so it's technically not a *new* feature. It does, however, mean that you'll have less time to stabilise the code >compared to the rest of Qt. And I do expect this to be an area of serious interest once 5.0 is out: if we do

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread shane.kearns
> On Thu, Jan 05, 2012 at 10:38:37PM -0200, ext Thiago Macieira wrote: > > What happens if you open the file in read or read-write mode while the > > flag is on? > > > for read-only this is obviously meaningless. > the mode is inherently incompatible with read-write without truncate. > in read-writ

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Artur Souza (MoRpHeUz)
On Thu, Jan 5, 2012 at 8:32 PM, David Faure wrote: > Now there's just one question remaining: even if the rule is that all > operations apply to the temp file, between open and close... what should > QFile::fileName() return? The temp file name, to obey that rule, or the target > file name, for sy

Re: [Development] Qt 5 feature freeze

2012-01-06 Thread marius.storm-olsen
> We also can't move existing bugs to be a subtask of that one. Can > someone please move > https://bugreports.qt.nokia.com/browse/QTBUG-22622 to be a subtask of > QTBUG-20885? Done -- .marius ___ Development mailing list Development@qt-project.org htt

Re: [Development] Possible bug in signals and slots handling in QML.

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 12.26.32, aaron.kenn...@nokia.com wrote: > Hi, > > Nice catch. I've added http://codereview.qt-project.org/12392 - feel free > to review if you're not beaten to it :) Thanks for being quick about this likely-to-be-P5-bug :-) Unfortunately, the code is beyond me.

Re: [Development] Possible bug in signals and slots handling in QML.

2012-01-06 Thread aaron.kennedy
Hi, Nice catch. I've added http://codereview.qt-project.org/12392 - feel free to review if you're not beaten to it :) Cheers, Aaron On 06/01/2012, at 1:01 AM, ext Thiago Macieira wrote: > On Wednesday, 4 de January de 2012 16.05.36, aaron.kenn...@nokia.com wrote: >> We don't allow signal or

Re: [Development] Feature freeze date?

2012-01-06 Thread Thiago Macieira
On Friday, 6 de January de 2012 10.16.49, Friedemann Kleint wrote: > Hi, > > for QtWidgets, there is still a lot of work to be done before everything > is in place. That is, a lot of stuff needs to happen around: > > Widgets: QGuiPlatformPluginInterface > Gui: QPlatformTheme > > meaning factoring o

Re: [Development] Issues porting android platform plugin from qt-android

2012-01-06 Thread morten.sorvig
On Jan 5, 2012, at 6:33 PM, ext Ismael Luceno wrote: > While adapting this code, I found that QPlatformDesktopService is gone. > > I'm inexperienced with QT, is there some place where I could read about > the change and its implications? I don't think this class was ever in Qt, perhaps it was

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Oswald Buddenhagen
On Fri, Jan 06, 2012 at 09:59:10AM +0100, ext Eirik Aavitsland wrote: > On 01/06/2012 12:45 AM, ext craig.sc...@csiro.au wrote: > > The temporary file is meant to be an updated version of the real > > target. If you want to call rename(), you really should first commit > > any changes and then rena

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread João Abecasis
David Faure wrote: > A very common issue with writing over an existing file, is that in > case of problem in the middle of the writing operation (disk full, > application crash, power failure...) the existing file will be lost. > If it contained your thesis, you might be a bit angry at the Qt > app

Re: [Development] Compiling Qt5 on Ubuntu Oneiric

2012-01-06 Thread Robin Burchell
On Fri, Jan 6, 2012 at 6:28 AM, Nicola De Filippo wrote: > Hi, > who to compile with success, on  which >  distribution to do? >        N. So long as you have the requirements, distro really shouldn't matter. I'm sure there's a pretty big mix. I use Fedora 16.

Re: [Development] Feature freeze date?

2012-01-06 Thread Friedemann Kleint
Hi, for QtWidgets, there is still a lot of work to be done before everything is in place. That is, a lot of stuff needs to happen around: Widgets: QGuiPlatformPluginInterface Gui: QPlatformTheme meaning factoring out the platform-specific code enclosed in Q_WS_XX and moving it into one of tho

Re: [Development] QFile: writing via a temporary file

2012-01-06 Thread Eirik Aavitsland
On 01/06/2012 12:45 AM, ext craig.sc...@csiro.au wrote: > > If the rule is that all operations apply to the temp file rather than > the originally named file, this will potentially change the behaviour > of existing functions that accept a QFile as a parameter. I'm leaning > more towards having rem

Re: [Development] sizeHint for QAbstractScrollArea, especially item views

2012-01-06 Thread Stephen Kelly
On Thursday, December 22, 2011 18:06:51 Christoph Schleifenbaum wrote: > Hi, > > currently, item views do return a rather random size hint. Some at KDAB, > including me, would love to see a size hint actually being related to the > scroll area's content. For this, we thought of a method viewportSi