From d5d2f27da9d819b23796190226fcfd9b35b47490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 19 Jul 2004 14:06:27 +0000 Subject: [PATCH] Add regexp capturing parentheses. svn path=/trunk/kdebase/kwin/; revision=330899 --- kcmkwin/kwinrules/ruleswidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index d342471fe2..b8b88c9e3f 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -180,7 +180,7 @@ static QString positionToStr( const QPoint& p ) static QPoint strToPosition( const QString& str ) { // two numbers, with + or -, separated by any of , x X : - QRegExp reg( "\\s*[+-]?[0-9]*\\s*[,xX:]\\s*[-+]?[0-9]*\\s*" ); + QRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" ); if( !reg.exactMatch( str )) return invalidPoint; return QPoint( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt()); @@ -195,7 +195,7 @@ static QString sizeToStr( const QSize& s ) static QSize strToSize( const QString& str ) { // two numbers, with + or -, separated by any of , x X : - QRegExp reg( "\\s*[+-]?[0-9]*\\s*[,xX:]\\s*[-+]?[0-9]*\\s*" ); + QRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" ); if( !reg.exactMatch( str )) return QSize(); return QSize( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt());