From 46807ccba3cd55302e71ee865fa87131f123ed17 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 15 Feb 2014 03:59:38 +0100 Subject: Add icons to ArchiveBrowser --- smglobals.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'smglobals.cpp') diff --git a/smglobals.cpp b/smglobals.cpp index 5f50ede..e5c67f4 100644 --- a/smglobals.cpp +++ b/smglobals.cpp @@ -93,13 +93,17 @@ QAbstractItemModel *SmGlobals::model(const QString &which){ mModels.insert(which, model); } }else if(which == "ArchiveModel"){ - QStringList headers = QStringList() << tr("Series") << tr("Series ID") << tr("Series part ID") << tr("Part") << tr("Type") << tr("Favorite") << tr("Subtitle") << tr("Count"); - ArchiveModel *model = new ArchiveModel(headers); - mModels.insert(which, model); + if(!mModels.contains("ArchiveModel")){ + QStringList headers = QStringList() << tr("Series") << tr("Series ID") << tr("Series part ID") << tr("Part") << tr("Type") << tr("Favorite") << tr("Subtitle") << tr("Count"); + ArchiveModel *model = new ArchiveModel(headers); + mModels.insert(which, model); + } }else if(which == "BrowserModel"){ - QStringList headers = QStringList() << tr("Name") << tr("Generic Id") << tr("Node Type") << tr("Size") << tr("Quality") << tr("File Type") << tr("Full Path") << tr("Selected"); - ArchiveBrowserModel *model = new ArchiveBrowserModel(headers); - mModels.insert(which, model); + if(!mModels.contains("BrowserModel")){ + QStringList headers = QStringList() << QChar(0x26A7) << tr("Name") << tr("Generic Id") << tr("Node Type") << tr("Size") << tr("Quality") << tr("File Type") << tr("Full Path") << tr("Selected"); + ArchiveBrowserModel *model = new ArchiveBrowserModel(headers); + mModels.insert(which, model); + } } return mModels.contains(which) ? mModels.value(which) : 0; } -- cgit v1.2.3-70-g09d2