mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Account: Make sure that davPath() always comes with trailing slash.
This commit is contained in:
parent
16d6418d10
commit
93e1ad088c
2 changed files with 17 additions and 1 deletions
|
@ -61,6 +61,17 @@ Account::~Account()
|
|||
delete _am;
|
||||
}
|
||||
|
||||
QString Account::davPath() const
|
||||
{
|
||||
// make sure to have a trailing slash
|
||||
if( !_davPath.endsWith('/') ) {
|
||||
QString dp(_davPath);
|
||||
dp.append('/');
|
||||
return dp;
|
||||
}
|
||||
return _davPath;
|
||||
}
|
||||
|
||||
void Account::setSharedThis(AccountPtr sharedThis)
|
||||
{
|
||||
_sharedThis = sharedThis.toWeakRef();
|
||||
|
|
|
@ -60,7 +60,12 @@ public:
|
|||
class OWNCLOUDSYNC_EXPORT Account : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QString davPath() const { return _davPath; }
|
||||
/**
|
||||
* @brief The possibly themed dav path for the account. Is has
|
||||
* a trailing slash.
|
||||
* @returns the (themeable) dav path for the account.
|
||||
*/
|
||||
QString davPath() const;
|
||||
void setDavPath(const QString&s) { _davPath = s; }
|
||||
|
||||
static AccountPtr create();
|
||||
|
|
Loading…
Reference in a new issue