-
-
Notifications
You must be signed in to change notification settings - Fork 122
/
PkgManager.cpp
48 lines (34 loc) · 903 Bytes
/
PkgManager.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* File name: PkgManager.cpp
* Summary: Package manager support for QDirStat
* License: GPL V2 - See file LICENSE for details.
*
* Author: Stefan Hundhammer <Stefan.Hundhammer@gmx.de>
*/
#include "PkgManager.h"
#include "Logger.h"
#include "Exception.h"
using namespace QDirStat;
PkgManager::PkgManager()
{
}
PkgManager::~PkgManager()
{
// NOP
}
QStringList PkgManager::fileList( PkgInfo * pkg )
{
QStringList fileList;
QString command = fileListCommand( pkg );
if ( ! command.isEmpty() )
{
int exitCode = -1;
QString output = runCommand( command,
&exitCode,
true, // logCommand
false ); // logOutput
if ( exitCode == 0 )
fileList = parseFileList( output );
}
return fileList;
}