|
From: <vz...@us...> - 2008-02-27 22:58:41
|
Revision: 23
http://kbarcode.svn.sourceforge.net/kbarcode/?rev=23&view=rev
Author: vzsolt
Date: 2008-02-27 14:58:46 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
QValueList has been replaced with QList.
Based on the porting guide, the API changes are minimal, so I assume it's as easy as renaming the classes.
Modified Paths:
--------------
trunk/src/barkode.cpp
trunk/src/barkode.h
trunk/src/batchprinter.cpp
trunk/src/batchprinter.h
trunk/src/batchwizard.cpp
trunk/src/csvfile.h
trunk/src/csvimportdlg.cpp
trunk/src/csvimportdlg.h
trunk/src/dsrichtext.cpp
trunk/src/dsrichtext.h
trunk/src/dstextedit.cpp
trunk/src/labeleditor.cpp
trunk/src/mycanvasview.h
trunk/src/tokendialog.cpp
trunk/src/tokendialog.h
trunk/src/tokenprovider.cpp
trunk/src/tokenprovider.h
Modified: trunk/src/barkode.cpp
===================================================================
--- trunk/src/barkode.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/barkode.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -27,7 +27,7 @@
#ifdef _ENABLE_NATIVE_GNU_BARCODE
# include <barcode.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#else
#define BARCODE_DEFAULT_FLAGS 0x00000000
@@ -72,7 +72,7 @@
#include <klocale.h>
#include <kstandarddirs.h>
-QValueList<tBarcodeInfo> Barkode::s_info;
+QList<tBarcodeInfo> Barkode::s_info;
QStringList* Barkode::s_encoding = NULL;
bool Barkode::s_haveGnuBarcode = false;
bool Barkode::s_havePdfEncode = false;
Modified: trunk/src/barkode.h
===================================================================
--- trunk/src/barkode.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/barkode.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -24,7 +24,7 @@
#include <qcolor.h>
#include <qstring.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#include <QPixmap>
#include "barkodeengine.h"
@@ -84,7 +84,7 @@
QString validatorNot;
};
-typedef QValueList<tBarcodeInfo> TBarcodeInfoList;
+typedef QList<tBarcodeInfo> TBarcodeInfoList;
class BarkodeEngine;
class QPainter;
@@ -175,7 +175,7 @@
inline const BarkodeEngine* engine() const;
/** Test if the encodingType @p type has a certain
- * @p feature, as defined in the codes QValueList.
+ * @p feature, as defined in the codes QList.
*/
static bool hasFeature( const QString & type, unsigned int feature );
/** Returns the internal value for the encoding type @p typedef
Modified: trunk/src/batchprinter.cpp
===================================================================
--- trunk/src/batchprinter.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/batchprinter.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -29,7 +29,7 @@
#include <q3paintdevicemetrics.h>
#include <q3progressdialog.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#include <QPixmap>
// KDE includes
@@ -522,7 +522,7 @@
return true;
}
-void BatchPrinter::setData( QValueList<data>* list )
+void BatchPrinter::setData( QList<data>* list )
{
if( m_data )
delete m_data;
Modified: trunk/src/batchprinter.h
===================================================================
--- trunk/src/batchprinter.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/batchprinter.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -21,7 +21,7 @@
#include "measurements.h"
#include <qmap.h>
-#include <q3valuelist.h>
+#include <QList>
namespace KABC {
class AddresseeList;
@@ -37,7 +37,7 @@
class QWidget;
class QPaintDevice;
-typedef QValueList< QMap<QString,QString> > TVariableList;
+typedef QList< QMap<QString,QString> > TVariableList;
/**
This class is responsible for batch printing of articles.
It is also responsible for creating images of all articles.
@@ -86,7 +86,7 @@
/** set the sql data for the batchprinter
* @p list will be deleted by the batchprinter
*/
- void setData( QValueList<data>* list );
+ void setData( QList<data>* list );
/** set the variable data for the batchprinter
* @p list will be deleted by the batchprinter
@@ -152,7 +152,7 @@
Definition* def;
Measurements m_measure;
- QValueList<data>* m_data;
+ QList<data>* m_data;
TVariableList* m_vardata;
KABC::AddresseeList* m_addrdata;
Modified: trunk/src/batchwizard.cpp
===================================================================
--- trunk/src/batchwizard.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/batchwizard.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -44,7 +44,7 @@
#include <q3widgetstack.h>
//Added by qt3to4:
#include <QHBoxLayout>
-#include <QValueList>
+#include <QList>
#include <QSqlQuery>
#include <QSqlCursor>
#include <QFrame>
@@ -663,7 +663,7 @@
sqlList->setSorting( 3, true );
sqlList->sort();
- QValueList<BatchPrinter::data>* dlist = new QValueList<BatchPrinter::data>;
+ QList<BatchPrinter::data>* dlist = new QList<BatchPrinter::data>;
QListViewItem* item = sqlList->firstChild();
while( item )
{
@@ -685,7 +685,7 @@
batch->setLabels( numLabels->value() );
// do a dirty drick, TODO: refactor BatchPrinter in the future
- QValueList<BatchPrinter::data>* dlist = new QValueList<BatchPrinter::data>;
+ QList<BatchPrinter::data>* dlist = new QList<BatchPrinter::data>;
BatchPrinter::data m_data;
m_data.number = numLabels->value();
dlist->append( m_data );
Modified: trunk/src/csvfile.h
===================================================================
--- trunk/src/csvfile.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/csvfile.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -22,7 +22,7 @@
#include <qstringlist.h>
#include <q3textstream.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
class QBuffer;
@@ -67,7 +67,7 @@
/** set the field widths for fixed field width files
*/
- inline void setFieldWidth( const QValueList<int> & width );
+ inline void setFieldWidth( const QList<int> & width );
/** sets wether this is a CSV file or
* a file with fixed field width.
@@ -100,7 +100,7 @@
QString m_separator;
QString m_comment;
- QValueList<int> m_width;
+ QList<int> m_width;
bool m_csv;
bool m_eof;
@@ -144,7 +144,7 @@
m_comment = comment;
}
-void CSVFile::setFieldWidth( const QValueList<int> & width )
+void CSVFile::setFieldWidth( const QList<int> & width )
{
m_width = width;
}
Modified: trunk/src/csvimportdlg.cpp
===================================================================
--- trunk/src/csvimportdlg.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/csvimportdlg.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -40,7 +40,7 @@
//Added by qt3to4:
#include <QHBoxLayout>
#include <QGridLayout>
-#include <QValueList>
+#include <QList>
#include <QVBoxLayout>
// KDE includes
@@ -336,7 +336,7 @@
{
CSVFile file( requester->url() );
QHeader* h = table->horizontalHeader();
- QValueList<int> headers;
+ QList<int> headers;
QStringList list;
QString name = getDatabaseName();
int i = 0;
@@ -409,9 +409,9 @@
settingsChanged();
}
-QValueList<int> CSVImportDlg::getFieldWidth()
+QList<int> CSVImportDlg::getFieldWidth()
{
- QValueList<int> list;
+ QList<int> list;
for( unsigned int i=0;i<listWidth->count();i++ )
list << listWidth->text( i ).toInt();
@@ -421,7 +421,7 @@
void CSVImportDlg::initCsvFile( CSVFile* file )
{
- QValueList<int> width = getFieldWidth();
+ QList<int> width = getFieldWidth();
file->setEncoding( comboEncoding->currentText() );
file->setCSVFile( radioCSVFile->isChecked() );
Modified: trunk/src/csvimportdlg.h
===================================================================
--- trunk/src/csvimportdlg.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/csvimportdlg.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -21,7 +21,7 @@
#include <qwidget.h>
//Added by qt3to4:
#include <QFrame>
-#include <QValueList>
+#include <QList>
#include <kdialogbase.h>
class CSVFile;
@@ -77,7 +77,7 @@
/** Get the field with from listWidth
* as an integer list.
*/
- QValueList<int> getFieldWidth();
+ QList<int> getFieldWidth();
/** Create the first tab of the dialog
* to set the import data.
Modified: trunk/src/dsrichtext.cpp
===================================================================
--- trunk/src/dsrichtext.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/dsrichtext.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -24,7 +24,7 @@
#include <qpainter.h>
#include <qregexp.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
// for DSREPLACE
#include "sqltables.h"
@@ -85,7 +85,7 @@
f->color = m_color;
}
-void DSRichText::initLine( QValueList<formated_line>* l )
+void DSRichText::initLine( QList<formated_line>* l )
{
formated_line li;
li.width = 0;
@@ -96,7 +96,7 @@
l->append( li );
}
-void DSRichText::updateSpacing( QValueList<formated_line>* l, QFontMetrics* fm )
+void DSRichText::updateSpacing( QList<formated_line>* l, QFontMetrics* fm )
{
l->last().lineSpacing = (l->last().lineSpacing < fm->lineSpacing()) ? fm->lineSpacing() : l->last().lineSpacing;
l->last().ascent = (l->last().ascent < fm->ascent()) ? fm->ascent() : l->last().ascent;
Modified: trunk/src/dsrichtext.h
===================================================================
--- trunk/src/dsrichtext.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/dsrichtext.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -25,7 +25,7 @@
#include <qcolor.h>
#include <qfont.h>
#include <qstring.h>
-#include <q3valuelist.h>
+#include <QList>
class DSRichText;
@@ -41,7 +41,7 @@
bool line;
};
-typedef QValueList<formated_word> WordList;
+typedef QList<formated_word> WordList;
/** This structure represents a single line.
* Every line contains a list of formated_words.
@@ -59,7 +59,7 @@
WordList formats;
};
-typedef QValueList<formated_line> LineList;
+typedef QList<formated_line> LineList;
class QColor;
class QPainter;
@@ -151,8 +151,8 @@
QString parse( const QString & t, const QString & find, const QString & end, int start );
void parseWords( const QString & t, formated_word* w, WordList* words );
void initFormat( formated_word* f, int alignment );
- void initLine( QValueList<formated_line>* l );
- void updateSpacing( QValueList<formated_line>* l, QFontMetrics* fm );
+ void initLine( QList<formated_line>* l );
+ void updateSpacing( QList<formated_line>* l, QFontMetrics* fm );
/** draw the line @p line justified as blockquote
*/
void drawJustified( formated_line* line );
@@ -185,8 +185,8 @@
QColor m_color;
QPainter* painter;
- QValueList<LineList> line_p;
- QValueList<WordList> word_p;
+ QList<LineList> line_p;
+ QList<WordList> word_p;
};
#endif // QT_TEXT_BUG
Modified: trunk/src/dstextedit.cpp
===================================================================
--- trunk/src/dstextedit.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/dstextedit.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -19,7 +19,7 @@
#include "dstextedit.moc"
#include <qregexp.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
DSTextEdit::DSTextEdit( QWidget* parent )
: TextEditBase( parent )
@@ -41,7 +41,7 @@
int i;
int para, index; // needed to save the cursor position
int paraFrom, indexFrom, paraTo, indexTo; // needed to save the selection
- QValueList<int> chars;
+ QList<int> chars;
QRegExp reg("<p[^>]*>");
for( i = 0; i < paragraphs(); i++ )
Modified: trunk/src/labeleditor.cpp
===================================================================
--- trunk/src/labeleditor.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/labeleditor.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -78,7 +78,7 @@
#if QT_VERSION <= 0x030100
#include <qregexp.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#include <QCString>
#include <QCloseEvent>
#endif
@@ -816,7 +816,7 @@
batch->setCustomer( QString::null );
batch->setEvents( false );
- QValueList<BatchPrinter::data>* list = new QValueList<BatchPrinter::data>;
+ QList<BatchPrinter::data>* list = new QList<BatchPrinter::data>;
BatchPrinter::data m_data;
m_data.number = copies;
m_data.article_no = QString::null;
Modified: trunk/src/mycanvasview.h
===================================================================
--- trunk/src/mycanvasview.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/mycanvasview.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -19,7 +19,7 @@
#define MYCANVASVIEW_H
#include <q3canvas.h>
-#include <q3valuelist.h>
+#include <QList>
//Added by qt3to4:
#include <QResizeEvent>
#include <QLabel>
@@ -28,7 +28,7 @@
class TCanvasItem;
-typedef QValueList<TCanvasItem*> TCanvasItemList;
+typedef QList<TCanvasItem*> TCanvasItemList;
class QRect;
Modified: trunk/src/tokendialog.cpp
===================================================================
--- trunk/src/tokendialog.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/tokendialog.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -30,7 +30,7 @@
#include <qlayout.h>
#include <qsplitter.h>
#include <qtooltip.h>
-#include <q3valuelist.h>
+#include <QList>
#include <q3vbox.h>
#include <qvbuttongroup.h>
#include <q3widgetstack.h>
@@ -154,7 +154,7 @@
"In the case of the sqlquery token, the sure has to enter a sql query in "
"this text field.</qt>" ) );
- QValueList<int> sizes;
+ QList<int> sizes;
int w = (width() / 4);
sizes << w << w * 3;
@@ -336,7 +336,7 @@
void TokenDialog::initAll()
{
unsigned int i, z;
- QValueList<tCategories>* categories = TokenProvider::getTokens();
+ QList<tCategories>* categories = TokenProvider::getTokens();
category->addItem( i18n("All") );
@@ -374,7 +374,7 @@
else
return;
- QValueList<tCategories>* categories = TokenProvider::getTokens();
+ QList<tCategories>* categories = TokenProvider::getTokens();
for( int i = 0; i < (int)categories->count(); i++ )
{
if( (*categories)[i].category == cat )
@@ -391,7 +391,7 @@
void TokenDialog::categoryChanged( QListBoxItem* item )
{
unsigned int i;
- QValueList<tCategories>* categories = TokenProvider::getTokens();
+ QList<tCategories>* categories = TokenProvider::getTokens();
allList->clear();
lineEdit->setEnabled( false );
Modified: trunk/src/tokendialog.h
===================================================================
--- trunk/src/tokendialog.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/tokendialog.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -22,7 +22,7 @@
#include "documentitem.h"
#include "tokenprovider.h"
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
class KListBox;
class KListView;
@@ -118,7 +118,7 @@
QWidget* stack2Page4;
QWidget* stack2Page5;
- QValueList<tToken> m_tokens;
+ QList<tToken> m_tokens;
TokenProvider* m_token;
KListBox* category;
Modified: trunk/src/tokenprovider.cpp
===================================================================
--- trunk/src/tokenprovider.cpp 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/tokenprovider.cpp 2008-02-27 22:58:46 UTC (rev 23)
@@ -28,7 +28,7 @@
#include <q3paintdevicemetrics.h>
#include <qsqlquery.h>
#include <qregexp.h>
-#include <q3valuelist.h>
+#include <QList>
#include <time.h>
#include <klocale.h>
@@ -177,7 +177,7 @@
{
}
-QValueList<tCategories> TokenProvider::s_categories;
+QList<tCategories> TokenProvider::s_categories;
QMap<TokenProvider::ECategories,QString> TokenProvider::s_captions;
#ifdef NO_KJS_EMBED
KJS::Interpreter* TokenProvider::s_interpreter = NULL;
@@ -194,7 +194,7 @@
#endif // USE_JAVASCRIPT
}
-QValueList<tCategories>* TokenProvider::getTokens()
+QList<tCategories>* TokenProvider::getTokens()
{
TokenProvider::init();
return &s_categories;
Modified: trunk/src/tokenprovider.h
===================================================================
--- trunk/src/tokenprovider.h 2008-02-27 21:54:25 UTC (rev 22)
+++ trunk/src/tokenprovider.h 2008-02-27 22:58:46 UTC (rev 23)
@@ -26,7 +26,7 @@
#include <qstring.h>
#include <qregexp.h>
//Added by qt3to4:
-#include <QValueList>
+#include <QList>
#include <time.h>
#include "documentitem.h"
@@ -60,7 +60,7 @@
struct tCategories {
int category;
- QValueList<tToken> tokens;
+ QList<tToken> tokens;
};
@@ -89,7 +89,7 @@
static bool hasJavaScript();
- static QValueList<tCategories>* getTokens();
+ static QList<tCategories>* getTokens();
/**
* Get a caption which can be displayed to the user from
@@ -229,7 +229,7 @@
KABC::Addressee* m_address;
QStringList* m_findUserVarsList;
- static QValueList<tCategories> s_categories;
+ static QList<tCategories> s_categories;
static QMap<ECategories, QString> s_captions;
#ifdef NO_KJS_EMBED
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|