mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Don't use the database error functions for directory error reporting.
This commit is contained in:
parent
a4ab113696
commit
ea83c560ee
@ -20,7 +20,7 @@ void ConsoleUILibraryCreator::createLibrary(const QString & name, const QString
|
|||||||
QDir pathDir(path);
|
QDir pathDir(path);
|
||||||
if (!pathDir.exists())
|
if (!pathDir.exists())
|
||||||
{
|
{
|
||||||
manageCreatingError(QString("Directory not found.") );
|
std::cout << "Directory not found." << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ void ConsoleUILibraryCreator::createLibrary(const QString & name, const QString
|
|||||||
|
|
||||||
connect(libraryCreator, &LibraryCreator::finished, &eventLoop, &QEventLoop::quit);
|
connect(libraryCreator, &LibraryCreator::finished, &eventLoop, &QEventLoop::quit);
|
||||||
|
|
||||||
std::cout << "Processing comics" << std::endl;
|
std::cout << "Processing comics";
|
||||||
|
|
||||||
libraryCreator->start();
|
libraryCreator->start();
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
@ -59,7 +59,7 @@ void ConsoleUILibraryCreator::updateLibrary(const QString & path)
|
|||||||
QDir pathDir(path);
|
QDir pathDir(path);
|
||||||
if (!pathDir.exists())
|
if (!pathDir.exists())
|
||||||
{
|
{
|
||||||
manageCreatingError(QString("Directory not found.") );
|
std::cout << "Directory not found." << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString cleanPath = QDir::cleanPath(pathDir.absolutePath());
|
QString cleanPath = QDir::cleanPath(pathDir.absolutePath());
|
||||||
@ -72,7 +72,7 @@ void ConsoleUILibraryCreator::updateLibrary(const QString & path)
|
|||||||
|
|
||||||
connect(libraryCreator, &LibraryCreator::finished, &eventLoop, &QEventLoop::quit);
|
connect(libraryCreator, &LibraryCreator::finished, &eventLoop, &QEventLoop::quit);
|
||||||
|
|
||||||
std::cout << "Processing comics" << std::endl;
|
std::cout << "Processing comics";
|
||||||
|
|
||||||
libraryCreator->start();
|
libraryCreator->start();
|
||||||
eventLoop.exec();
|
eventLoop.exec();
|
||||||
@ -83,14 +83,14 @@ void ConsoleUILibraryCreator::addExistingLibrary(const QString & name, const QSt
|
|||||||
QDir pathDir(path);
|
QDir pathDir(path);
|
||||||
if (!pathDir.exists())
|
if (!pathDir.exists())
|
||||||
{
|
{
|
||||||
manageCreatingError(QString("Directory not found."));
|
std::cout << "Directory not found." << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString cleanPath = QDir::cleanPath(pathDir.absolutePath());
|
QString cleanPath = QDir::cleanPath(pathDir.absolutePath());
|
||||||
|
|
||||||
if (!QDir(cleanPath + "/.yacreaderlibrary").exists())
|
if (!QDir(cleanPath + "/.yacreaderlibrary").exists())
|
||||||
{
|
{
|
||||||
manageCreatingError(QString("No library database found in directory."));
|
std::cout << "No library database found in directory." << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user