Mailinglist Archive: yast-commit (322 mails)
| < Previous | Next > |
[yast-commit] r57285 - in /branches/tmp/tgoettlicher/yast2cc_rewrite/src: yqdesktopfilesmodel.cpp yqdesktopfilesmodel.h
- From: kmachalkova@xxxxxxxxxxxxxxxx
- Date: Thu, 21 May 2009 08:39:15 -0000
- Message-id: <E1M73o3-0004ya-FJ@xxxxxxxxxxxxxxxx>
Author: kmachalkova
Date: Thu May 21 10:39:15 2009
New Revision: 57285
URL: http://svn.opensuse.org/viewcvs/yast?rev=57285&view=rev
Log:
Some helper functions
Modified:
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp?rev=57285&r1=57284&r2=57285&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp
(original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp Thu
May 21 10:39:15 2009
@@ -266,4 +266,26 @@
return QModelIndex();
}
+void YQDesktopFilesModel::addDesktopFile( QString &fname )
+{
+ d->desktop_files.push_front( fname );
+}
+
+void YQDesktopFilesModel::addDesktopFiles( QStringList &flist )
+{
+ QStringListIterator it( flist );
+ while (it.hasNext())
+ {
+ QString one_string(it.next());
+ addDesktopFile( one_string);
+ }
+}
+
+void YQDesktopFilesModel::addPropertyToDesktopFile( QString &fname, QString
&key, QString &value)
+{
+ if (d->cache.find( fname ) != d->cache.end())
+ {
+ d->cache[ fname ].insert( key, value );
+ }
+}
#include "yqdesktopfilesmodel.moc"
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h?rev=57285&r1=57284&r2=57285&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h
(original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h Thu May
21 10:39:15 2009
@@ -83,6 +83,11 @@
virtual void sort( int column, Qt::SortOrder order = Qt::AscendingOrder );
virtual QModelIndex parent( const QModelIndex & index ) const;
+
+ void addDesktopFile(QString &fname);
+ void addDesktopFiles( QStringList &flist);
+ void addPropertyToDesktopFile( QString &fname, QString &key, QString
&value );
+
protected:
void readDesktopFilesDirectories();
void readDesktopFiles();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Thu May 21 10:39:15 2009
New Revision: 57285
URL: http://svn.opensuse.org/viewcvs/yast?rev=57285&view=rev
Log:
Some helper functions
Modified:
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp
branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp?rev=57285&r1=57284&r2=57285&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp
(original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.cpp Thu
May 21 10:39:15 2009
@@ -266,4 +266,26 @@
return QModelIndex();
}
+void YQDesktopFilesModel::addDesktopFile( QString &fname )
+{
+ d->desktop_files.push_front( fname );
+}
+
+void YQDesktopFilesModel::addDesktopFiles( QStringList &flist )
+{
+ QStringListIterator it( flist );
+ while (it.hasNext())
+ {
+ QString one_string(it.next());
+ addDesktopFile( one_string);
+ }
+}
+
+void YQDesktopFilesModel::addPropertyToDesktopFile( QString &fname, QString
&key, QString &value)
+{
+ if (d->cache.find( fname ) != d->cache.end())
+ {
+ d->cache[ fname ].insert( key, value );
+ }
+}
#include "yqdesktopfilesmodel.moc"
Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h?rev=57285&r1=57284&r2=57285&view=diff
==============================================================================
--- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h
(original)
+++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqdesktopfilesmodel.h Thu May
21 10:39:15 2009
@@ -83,6 +83,11 @@
virtual void sort( int column, Qt::SortOrder order = Qt::AscendingOrder );
virtual QModelIndex parent( const QModelIndex & index ) const;
+
+ void addDesktopFile(QString &fname);
+ void addDesktopFiles( QStringList &flist);
+ void addPropertyToDesktopFile( QString &fname, QString &key, QString
&value );
+
protected:
void readDesktopFilesDirectories();
void readDesktopFiles();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |