Cleaned up.
authorMikko Keinänen <mikko.keinanen@gmail.com>
Sat, 16 Oct 2010 22:23:54 +0000 (01:23 +0300)
committerMikko Keinänen <mikko.keinanen@gmail.com>
Sat, 16 Oct 2010 22:23:54 +0000 (01:23 +0300)
src/emulauncher.cpp
src/utils/emuhelper.cpp
src/utils/unziphelper.cpp

index f334e60..ce6f731 100644 (file)
@@ -21,7 +21,6 @@
 #include <QProcess>
 #include <QSqlTableModel>
 #include <QItemSelectionModel>
-//#include "utils/OSDaB-Zip/unzip.h"
 #include "emulauncher.h"
 #include "db/dbmediatype.h"
 #include "db/dbplatform.h"
index 9e6c331..f190c05 100644 (file)
@@ -35,17 +35,12 @@ void EmuHelper::launch(const Executable * ex, const MediaImageContainer * mic)
 {
     // extract the media image container to tmp folder
     // (TODO: tmp folder configuration)
-    //UnZip unz;
 
     QString fp;
     fp.append(mic->getFilePath()->getName());
     if (!fp.endsWith('/')) fp.append("/");
     fp.append(mic->getName());
 
-    //unz.openArchive(fp);
-    //int err = unz.extractAll("/tmp/"); // TODO: this must be set dynamically
-    //qDebug() << "extractAll to " << fp << " : " << err;
-
     int ret = unzipHelper->extractAll(fp, "/tmp/");
 
     if (ret) {
index e58ed03..9a20b69 100644 (file)
@@ -115,25 +115,6 @@ QList<MediaImage*> UnzipHelper::listContents(const QString filePath, const FileP
         fileList << effo;
     }
 
-    /*UnZip uz;
-    UnZip::ErrorCode ec = uz.openArchive(filePath);
-    if (ec != UnZip::Ok)
-        throw EmuFrontException(tr("Error while opening zip-file %1, error code %2").arg(filePath).arg(ec));
-
-    QList<UnZip::ZipEntry> list = uz.entryList();
-    foreach(UnZip::ZipEntry entry, list)
-    {
-        qDebug() << "Zip entry " << entry.filename;
-        if (isSupportedFile(entry.filename, sup->getSupportedFileTypeExtensions()))
-        {
-            QString checksum = QString("%1").arg(entry.crc32, 0, 16);
-            qDebug() << "Checksum " << checksum;
-            MediaImage *effo = new MediaImage(entry.filename,
-                checksum, entry.uncompressedSize);
-            fileList << effo;
-        }
-    }*/
-
     qDebug() << "File list has " << fileList.size() << " entries.";
     return fileList;