|
From: <dom...@us...> - 2008-03-04 08:50:49
|
Revision: 30
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=30&view=rev
Author: domseichter
Date: 2008-03-04 00:50:46 -0800 (Tue, 04 Mar 2008)
Log Message:
-----------
Minor porting work here and there.
Modified Paths:
--------------
trunk/src/barcodecombo.cpp
trunk/src/documentitem.h
trunk/src/xmlutils.cpp
trunk/src/xmlutils.h
Modified: trunk/src/barcodecombo.cpp
===================================================================
--- trunk/src/barcodecombo.cpp 2008-03-03 22:30:26 UTC (rev 29)
+++ trunk/src/barcodecombo.cpp 2008-03-04 08:50:46 UTC (rev 30)
@@ -65,7 +65,7 @@
if( pattern->isEmpty() )
return true;
- compiled = pcre_compile( pattern->latin1(), 0, &error, &erroffset, NULL );
+ compiled = pcre_compile( pattern->toLatin1().data(), 0, &error, &erroffset, NULL );
if( !compiled ) // ignore all errors
return true;
@@ -109,12 +109,7 @@
void BarcodeCombo::setEncodingType( const QString & type )
{
const QString name = Barkode::nameFromType( type );
- for( unsigned int z = 0; z < (unsigned int)count(); z++ )
- if( text( z ) == name )
- {
- setCurrentItem( z );
- break;
- }
+ setCurrentItem( name, false );
}
BarcodeWidget::BarcodeWidget(QWidget *parent)
Modified: trunk/src/documentitem.h
===================================================================
--- trunk/src/documentitem.h 2008-03-03 22:30:26 UTC (rev 29)
+++ trunk/src/documentitem.h 2008-03-04 08:50:46 UTC (rev 30)
@@ -224,7 +224,7 @@
return m_visibilityScript;
}
-typedef QSortedList<DocumentItem> DocumentItemList;
+typedef QList<DocumentItem> DocumentItemList;
#endif //DOCUMENTITEM_H
Modified: trunk/src/xmlutils.cpp
===================================================================
--- trunk/src/xmlutils.cpp 2008-03-03 22:30:26 UTC (rev 29)
+++ trunk/src/xmlutils.cpp 2008-03-04 08:50:46 UTC (rev 30)
@@ -213,6 +213,7 @@
}
}
+ qSort( list->begin(), list->end() );
}
void XMLUtils::writeXMLDocumentItem( QDomElement* root, DocumentItem** item )
Modified: trunk/src/xmlutils.h
===================================================================
--- trunk/src/xmlutils.h 2008-03-03 22:30:26 UTC (rev 29)
+++ trunk/src/xmlutils.h 2008-03-04 08:50:46 UTC (rev 30)
@@ -34,7 +34,7 @@
class QRect;
class QString;
class QWidget;
-typedef QSortedList<DocumentItem> DocumentItemList;
+typedef QList<DocumentItem> DocumentItemList;
/** This class provides helper function for saving and reading to XML files.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|