Peter Kümmel wrote:
Abdelrazak Younes wrote:
Peter Kümmel wrote:
+ {
+#ifdef Q_OS_WIN
+ int x, y;
+ int w, h;
+ QRegExp re( "[=]*(?:([0-9]+)[xX]([0-9]+)){0,1}[
]*(?:([+-][0-9]*)([+-][0-9]*)){0,1}" );
+ re.indexIn( toqstr(geometryArg.c_str()));
+ w = re.cap( 1 ).toInt();
+ h = re.cap( 2 ).toInt();
+ x = re.cap( 3 ).toInt();
+ y = re.cap( 4 ).toInt();
+ QWidget::setGeometry( x, y, w, h );
+#endif
+ }
Couldn't you do that parsing in parse_geometry() instead and overwrite
width and height?
Then I don't have QRegExp, and must convert it to boost code, which I don't
know, additionally the Qt version is already tested and when I add new code
I could introduce regressions. So I prefer it as it is, but I could add a
FIXME.
Yes, put a FIXME please. You know how much I hate #ifdef ;-), one #ifdef
in parse_geometry() should have been enough.
Abdel.