Skip to content

Commit

Permalink
Get rid of RemoteGetFreeSpace(), all it does is convert a QList to a …
Browse files Browse the repository at this point in the history
…QVector, and the container doesn't matter in any of the places it's used.
  • Loading branch information
daniel-kristjansson committed Aug 15, 2011
1 parent 0b17b4c commit 6879247
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 16 deletions.
10 changes: 0 additions & 10 deletions mythtv/libs/libmyth/remoteutil.cpp
Expand Up @@ -11,7 +11,6 @@
#include "mythcorecontext.h"
#include "storagegroup.h"
#include "mythevent.h"
#include "filesysteminfo.h"

vector<ProgramInfo *> *RemoteGetRecordedList(int sort)
{
Expand All @@ -36,15 +35,6 @@ vector<ProgramInfo *> *RemoteGetRecordedList(int sort)
return info;
}

/** \fn RemoteGetFreeSpace(void)
* \brief Returns total and used space in kilobytes for each backend.
*/
QVector<FileSystemInfo> RemoteGetFreeSpace(void)
{
QList<FileSystemInfo> fsInfos = FileSystemInfo::RemoteGetInfo();
return fsInfos.toVector();
}

bool RemoteGetLoad(float load[3])
{
QStringList strlist(QString("QUERY_LOAD"));
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmyth/remoteutil.h
Expand Up @@ -8,13 +8,11 @@
using namespace std;

#include "mythexp.h"
#include "filesysteminfo.h"

class ProgramInfo;
class MythEvent;

MPUBLIC vector<ProgramInfo *> *RemoteGetRecordedList(int sort);
MPUBLIC QVector<FileSystemInfo> RemoteGetFreeSpace(void);
MPUBLIC bool RemoteGetLoad(float load[3]);
MPUBLIC bool RemoteGetUptime(time_t &uptime);
MPUBLIC
Expand Down
1 change: 1 addition & 0 deletions mythtv/programs/mythbackend/autoexpire.cpp
Expand Up @@ -26,6 +26,7 @@ using namespace std;
#include <QList>

// MythTV headers
#include "filesysteminfo.h"
#include "autoexpire.h"
#include "programinfo.h"
#include "mythcorecontext.h"
Expand Down
1 change: 1 addition & 0 deletions mythtv/programs/mythbackend/scheduler.h
Expand Up @@ -15,6 +15,7 @@ using namespace std;
#include <QSet>

// MythTV headers
#include "filesysteminfo.h"
#include "recordinginfo.h"
#include "remoteutil.h"
#include "inputgroupmap.h"
Expand Down
5 changes: 3 additions & 2 deletions mythtv/programs/mythfrontend/playbackboxhelper.cpp
Expand Up @@ -11,13 +11,14 @@ using namespace std;
#include "metadataimagehelper.h"
#include "playbackboxhelper.h"
#include "mythcorecontext.h"
#include "filesysteminfo.h"
#include "tvremoteutil.h"
#include "storagegroup.h"
#include "mythlogging.h"
#include "programinfo.h"
#include "remoteutil.h"
#include "mythevent.h"
#include "mythdirs.h"
#include "mythlogging.h"

#define LOC QString("PlaybackBoxHelper: ")
#define LOC_WARN QString("PlaybackBoxHelper Warning: ")
Expand Down Expand Up @@ -381,7 +382,7 @@ void PlaybackBoxHelper::UndeleteRecording(

void PlaybackBoxHelper::UpdateFreeSpace(void)
{
QVector<FileSystemInfo> fsInfos = RemoteGetFreeSpace();
QList<FileSystemInfo> fsInfos = FileSystemInfo::RemoteGetInfo();

QMutexLocker locker(&m_lock);
for (int i = 0; i < fsInfos.size(); i++)
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfrontend/statusbox.cpp
Expand Up @@ -7,7 +7,7 @@ using namespace std;
#include <QHostAddress>

#include "mythcorecontext.h"

#include "filesysteminfo.h"
#include "mythdb.h"
#include "mythlogging.h"
#include "mythversion.h"
Expand Down Expand Up @@ -1289,7 +1289,7 @@ void StatusBox::doMachineStatus()
// get free disk space
QString hostnames;

QVector<FileSystemInfo> fsInfos = RemoteGetFreeSpace();
QList<FileSystemInfo> fsInfos = FileSystemInfo::RemoteGetInfo();
for (int i = 0; i < fsInfos.size(); ++i)
{
// For a single-directory installation just display the totals
Expand Down

0 comments on commit 6879247

Please sign in to comment.