[app] Added missing BooksStorage::fullConfigPath implementation
This commit is contained in:
parent
28a814dd26
commit
bf38202e31
1 changed files with 22 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015-2017 Jolla Ltd.
|
* Copyright (C) 2015-2018 Jolla Ltd.
|
||||||
* Contact: Slava Monich <slava.monich@jolla.com>
|
* Copyright (C) 2015-2018 Slava Monich <slava.monich@jolla.com>
|
||||||
*
|
*
|
||||||
* You may use this file under the terms of the BSD license as follows:
|
* You may use this file under the terms of the BSD license as follows:
|
||||||
*
|
*
|
||||||
|
@ -71,6 +71,7 @@ public:
|
||||||
bool isRemoved() const;
|
bool isRemoved() const;
|
||||||
bool equal(const Private& aData) const;
|
bool equal(const Private& aData) const;
|
||||||
|
|
||||||
|
static QString fullPath(QDir aDir, QString aRelativePath);
|
||||||
static QString mountPoint(QString aPath);
|
static QString mountPoint(QString aPath);
|
||||||
static bool isMountPoint(QString aPath);
|
static bool isMountPoint(QString aPath);
|
||||||
|
|
||||||
|
@ -149,6 +150,16 @@ QString BooksStorage::Private::mountPoint(QString aPath)
|
||||||
return dir.path();
|
return dir.path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString BooksStorage::Private::fullPath(QDir aDir, QString aRelativePath)
|
||||||
|
{
|
||||||
|
QString path(aDir.path());
|
||||||
|
if (!aRelativePath.isEmpty()) {
|
||||||
|
if (!path.endsWith('/')) path += '/';
|
||||||
|
path += aRelativePath;
|
||||||
|
}
|
||||||
|
return QDir::cleanPath(path);
|
||||||
|
}
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// BooksStorage
|
// BooksStorage
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
@ -221,12 +232,15 @@ bool BooksStorage::isPresent() const
|
||||||
QString BooksStorage::fullPath(QString aRelativePath) const
|
QString BooksStorage::fullPath(QString aRelativePath) const
|
||||||
{
|
{
|
||||||
if (iPrivate) {
|
if (iPrivate) {
|
||||||
QString path(booksDir().path());
|
return Private::fullPath(iPrivate->iBooksDir, aRelativePath);
|
||||||
if (!aRelativePath.isEmpty()) {
|
|
||||||
if (!path.endsWith('/')) path += '/';
|
|
||||||
path += aRelativePath;
|
|
||||||
}
|
}
|
||||||
return QDir::cleanPath(path);
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString BooksStorage::fullConfigPath(QString aRelativePath) const
|
||||||
|
{
|
||||||
|
if (iPrivate) {
|
||||||
|
return Private::fullPath(iPrivate->iConfigDir, aRelativePath);
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue