author | zecke <zecke> | 2002-09-10 14:21:14 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 14:21:14 (UTC) |
commit | 8b59b498892b0e345d977ccd520087b660a91437 (patch) (side-by-side diff) | |
tree | 4b9fef30cc51cce8e50c072038d15d8e10b29fb2 /library | |
parent | 4aad041a733e2478ff29330e1544e5fefcfb5cde (diff) | |
download | opie-8b59b498892b0e345d977ccd520087b660a91437.zip opie-8b59b498892b0e345d977ccd520087b660a91437.tar.gz opie-8b59b498892b0e345d977ccd520087b660a91437.tar.bz2 |
AppLnk fix QArray -> QMAp
-rw-r--r-- | library/applnk.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp index 298581a..41b3008 100644 --- a/library/applnk.cpp +++ b/library/applnk.cpp @@ -58,54 +58,57 @@ static QString safeFileName(const QString& n) safename.replace(QRegExp("^[^A-Za-z]*"),""); if ( safename.isEmpty() ) safename = "_"; return safename; } static bool prepareDirectories(const QString& lf) { if ( !QFile::exists(lf) ) { // May need to create directories QFileInfo fi(lf); if ( system(("mkdir -p "+fi.dirPath(TRUE))) ) return FALSE; } return TRUE; } class AppLnkPrivate { public: /* the size of the Pixmap */ enum Size {Normal = 0, Big }; AppLnkPrivate() { /* we want one normal and one big item */ - mPixmaps = QArray<QPixmap>(2); + + QPixmap pix; + mPixmaps.insert(0, pix ); + mPixmaps.insert(1, pix); } QStringList mCatList; // always correct QArray<int> mCat; // cached value; correct if not empty - QArray<QPixmap> mPixmaps; + QMap<int, QPixmap> mPixmaps; void updateCatListFromArray() { Categories cat( 0 ); cat.load( categoryFileName() ); mCatList = cat.labels("Document View",mCat); } void setCatArrayDirty() { mCat.resize(0); } void ensureCatArray() { if ( mCat.count() > 0 || mCatList.count()==0 ) return; Categories cat( 0 ); cat.load( categoryFileName() ); mCat.resize( mCatList.count() ); int i; QStringList::ConstIterator it; for ( i = 0, it = mCatList.begin(); it != mCatList.end(); |