Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
sandbox: add convenient addWorldFile()
  • Loading branch information
martyone committed Apr 9, 2013
1 parent 1a26540 commit 33e4688
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libssu/sandbox.cpp
Expand Up @@ -218,6 +218,11 @@ bool Sandbox::addWorldFiles(const QString &directory, QDir::Filters filters,
return true;
}

bool Sandbox::addWorldFile(const QString &file){
return addWorldFiles(QFileInfo(file).path(), QDir::NoFilter,
QStringList() << QFileInfo(file).fileName());
}

bool Sandbox::prepare(){
Q_ASSERT(m_defaultConstructed || !m_sandboxPath.isEmpty());

Expand Down
1 change: 1 addition & 0 deletions libssu/sandbox_p.h
Expand Up @@ -38,6 +38,7 @@ class Sandbox {

bool addWorldFiles(const QString &directory, QDir::Filters filters = QDir::NoFilter,
const QStringList &filterNames = QStringList());
bool addWorldFile(const QString &file);

private:
bool prepare();
Expand Down

0 comments on commit 33e4688

Please sign in to comment.