From 54247bb4d08ff3c9dc94874ac2c1bb09c99c4344 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Mon, 6 Jul 2015 17:16:17 +0300 Subject: [PATCH] Books -> Documents/Books for the internal storage To safisfy Jolla harbour requirements --- app/src/BooksDefs.h | 3 ++- app/src/BooksStorage.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/BooksDefs.h b/app/src/BooksDefs.h index cca95c6..2878f0a 100644 --- a/app/src/BooksDefs.h +++ b/app/src/BooksDefs.h @@ -43,7 +43,8 @@ #define BOOKS_DATA_DIR BOOKS_DATA_ROOT "/data" #define BOOKS_QML_FILE BOOKS_QML_DIR "/BooksMain.qml" -#define BOOKS_ROOT_SHELF_DIR "Books" +#define BOOKS_INTERNAL_ROOT "Documents/Books" +#define BOOKS_REMOVABLE_ROOT "Books" #define BOOKS_QML_PLUGIN "harbour.books" #define BOOKS_QML_PLUGIN_V1 1 diff --git a/app/src/BooksStorage.cpp b/app/src/BooksStorage.cpp index 0910e23..2caafcf 100644 --- a/app/src/BooksStorage.cpp +++ b/app/src/BooksStorage.cpp @@ -275,7 +275,7 @@ BooksStorageManager::Private::Private() : QString homeBooks = QDir::homePath(); QString homeMount(BooksStorage::Private::mountPoint(homeBooks)); if (!homeBooks.endsWith('/')) homeBooks += '/'; - homeBooks += QLatin1String(BOOKS_ROOT_SHELF_DIR); + homeBooks += QLatin1String(BOOKS_INTERNAL_ROOT); HDEBUG("home mount" << qPrintable(homeMount)); HDEBUG("home books path" << qPrintable(homeBooks)); @@ -297,7 +297,7 @@ BooksStorageManager::Private::Private() : QString dev = entries.at(0); QString path = mount; if (!path.endsWith('/')) path += '/'; - path += QLatin1String(BOOKS_ROOT_SHELF_DIR); + path += QLatin1String(BOOKS_REMOVABLE_ROOT); HDEBUG("removable device" << dev << path); iStorageList.append(BooksStorage(dev, path, false)); } @@ -486,7 +486,7 @@ bool BooksStorageManager::scanMounts() if (index < 0) { QString path = mount; if (!path.endsWith('/')) path += '/'; - path += QLatin1String(BOOKS_ROOT_SHELF_DIR); + path += QLatin1String(BOOKS_REMOVABLE_ROOT); HDEBUG("new removable device" << dev << path); BooksStorage storage(dev, path, false); iPrivate->iStorageList.append(storage);