[atlantik-cvs] CVS: kdegames/atlantik/libatlantikui estatedetails.cpp, 1.27, 1.28

[email protected] Tue, 27 Jan 2004 03:51:01 +0100 (CET)
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv30975/libatlantikui

Modified Files:
	estatedetails.cpp 
Log Message:
QString::find is faster than ::contains

Index: estatedetails.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/estatedetails.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- estatedetails.cpp	20 Jan 2004 06:51:30 -0000	1.27
+++ estatedetails.cpp	27 Jan 2004 02:50:59 -0000	1.28
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2003 Rob Kaper <[email protected]>
+// Copyright (c) 2002-2004 Rob Kaper <[email protected]>
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,7 @@
 #include <qpixmap.h>
 #include <qlayout.h>
 #include <qptrlist.h>
+#include <qregexp.h>
 #include <qvgroupbox.h>
 
 #include <kdialog.h>
@@ -295,7 +296,7 @@
 		return;
 
 	QListViewItem *infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), text);
-	if (text.contains("rolls"))
+	if ( text.find( QRegExp("rolls") ) != -1 )
 		infoText->setPixmap(0, QPixmap(SmallIcon("roll")));
 	else
 		infoText->setPixmap(0, QPixmap(SmallIcon("atlantik")));