~brandontschaefer/libertine/enable-maliit

« back to all changes in this revision

Viewing changes to libertine/ContainerConfigList.cpp

  • Committer: Chris Townsend
  • Date: 2016-04-08 20:16:41 UTC
  • mto: This revision was merged to the branch mainline in revision 198.
  • Revision ID: christopher.townsend@canonical.com-20160408201641-anl4m2jg8l6a7hf4
Add a file chooser for selecting Debian packages.  This file chooser only looks in the XDG Download dir (ie, ~/Downloads).

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <algorithm>
24
24
#include "libertine/ContainerConfig.h"
25
25
#include <QtCore/QDebug>
 
26
#include <QtCore/QDir>
26
27
#include <QtCore/QFile>
27
28
#include <QtCore/QJsonArray>
28
29
#include <QtCore/QJsonDocument>
32
33
#include <QtCore/QProcess>
33
34
#include <QtCore/QRegExp>
34
35
#include <QtCore/QSettings>
 
36
#include <QtCore/QStandardPaths>
35
37
#include <QtCore/QString>
36
38
#include <QtCore/QSysInfo>
37
39
 
224
226
 
225
227
  return QString(package_name.trimmed());
226
228
}
227
 
  
 
229
 
 
230
 
 
231
QString ContainerConfigList::
 
232
getDownloadsLocation()
 
233
{
 
234
  return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
 
235
}
 
236
 
 
237
 
 
238
QStringList ContainerConfigList::
 
239
getDebianPackageFiles()
 
240
{
 
241
  QStringList filters;
 
242
  QDir downloads(getDownloadsLocation());
 
243
 
 
244
  filters << "*.deb";
 
245
 
 
246
  return downloads.entryList(filters);
 
247
}
 
248
 
 
249
 
228
250
QList<ContainerArchives*> * ContainerConfigList::
229
251
getArchivesForContainer(QString const& container_id)
230
252
{