mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Extract library paths methods to it's own struct in yacreader_global.h and use it everywhere
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "create_library_dialog.h"
|
||||
#include "yacreader_global.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
@ -6,6 +7,8 @@
|
||||
#include <QSizePolicy>
|
||||
#include <QMessageBox>
|
||||
|
||||
using namespace YACReader;
|
||||
|
||||
CreateLibraryDialog::CreateLibraryDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
@ -87,7 +90,7 @@ void CreateLibraryDialog::create()
|
||||
QFileInfo f(path->text());
|
||||
if (f.exists() && f.isDir() && f.isWritable()) {
|
||||
if (!libraries.contains(nameEdit->text())) {
|
||||
emit createLibrary(QDir::cleanPath(path->text()), QDir::cleanPath(path->text()) + "/.yacreaderlibrary", nameEdit->text());
|
||||
emit createLibrary(QDir::cleanPath(path->text()), LibraryPaths::libraryDataPath(QDir::cleanPath(path->text())), nameEdit->text());
|
||||
close();
|
||||
} else
|
||||
emit libraryExists(nameEdit->text());
|
||||
|
Reference in New Issue
Block a user