mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 23:15:14 -04:00
added exit and notification on 7z lib not found
This commit is contained in:
@ -413,6 +413,8 @@ QList<QVector<quint32> > FileComic::getSections(int & sectionIndex)
|
||||
void FileComic::process()
|
||||
{
|
||||
CompressedArchive archive(_path);
|
||||
if(!archive.toolsLoaded())
|
||||
return;
|
||||
//se filtran para obtener s<>lo los formatos soportados
|
||||
_order = archive.getFileNames();
|
||||
_fileNames = filter(_order);
|
||||
|
21
common/exit_check.cpp
Normal file
21
common/exit_check.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "exit_check.h"
|
||||
|
||||
#include "yacreader_global.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
using namespace YACReader;
|
||||
|
||||
void YACReader::exitCheck(int ret)
|
||||
{
|
||||
switch(ret)
|
||||
{
|
||||
case YACReader::SevenZNotFound:
|
||||
QMessageBox::critical(0,QObject::tr("7z lib not found"),QObject::tr("unable to load 7z lib from ./utils"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
9
common/exit_check.h
Normal file
9
common/exit_check.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef EXIT_CHECK_H
|
||||
#define EXIT_CHECK_H
|
||||
|
||||
namespace YACReader
|
||||
{
|
||||
void exitCheck(int ret);
|
||||
}
|
||||
|
||||
#endif
|
@ -88,6 +88,11 @@ namespace YACReader
|
||||
Opened = 2
|
||||
};
|
||||
|
||||
enum YACReaderErrors
|
||||
{
|
||||
SevenZNotFound = 700
|
||||
};
|
||||
|
||||
QString getSettingsPath();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user