Skip to content

Commit

Permalink
Fix compilation when Qt is compiled without stl support.
Browse files Browse the repository at this point in the history
Qt to stl convenience functions aren't available if Qt was not compiled
with stl support - whcih seems to be a common OS X issue. QVector is a
drop-in replacement for vector, so just use it instead.
  • Loading branch information
Mark Kendall committed Jun 19, 2011
1 parent 434d76b commit f101e63
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmyth/remoteutil.cpp
Expand Up @@ -39,10 +39,10 @@ vector<ProgramInfo *> *RemoteGetRecordedList(int sort)
/** \fn RemoteGetFreeSpace(void)
* \brief Returns total and used space in kilobytes for each backend.
*/
vector<FileSystemInfo> RemoteGetFreeSpace(void)
QVector<FileSystemInfo> RemoteGetFreeSpace(void)
{
QList<FileSystemInfo> fsInfos = FileSystemInfo::RemoteGetInfo();
return fsInfos.toVector().toStdVector();
return fsInfos.toVector();
}

bool RemoteGetLoad(float load[3])
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/remoteutil.h
Expand Up @@ -14,7 +14,7 @@ class ProgramInfo;
class MythEvent;

MPUBLIC vector<ProgramInfo *> *RemoteGetRecordedList(int sort);
MPUBLIC vector<FileSystemInfo> RemoteGetFreeSpace(void);
MPUBLIC QVector<FileSystemInfo> RemoteGetFreeSpace(void);
MPUBLIC bool RemoteGetLoad(float load[3]);
MPUBLIC bool RemoteGetUptime(time_t &uptime);
MPUBLIC
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/playbackboxhelper.cpp
Expand Up @@ -528,7 +528,7 @@ void PlaybackBoxHelper::run(void)

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

QMutexLocker locker(&m_lock);
for (uint i = 0; i < fsInfos.size(); i++)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/statusbox.cpp
Expand Up @@ -1203,7 +1203,7 @@ void StatusBox::doMachineStatus()
// get free disk space
QString hostnames;

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

0 comments on commit f101e63

Please sign in to comment.