Fix handle casting in debug messages.

Change statvfs64 to statvfs and leave the build system configure it, so
it doesn't break on OS X.
Enable pkg-config on OS X.
This commit is contained in:
codestation
2013-09-29 11:10:47 -04:30
parent 2d88347e4d
commit 03e3fb9ad5
5 changed files with 7 additions and 6 deletions

View File

@@ -53,7 +53,7 @@ void CmaClient::connectUsb()
{ {
vita_device_t *vita; vita_device_t *vita;
qDebug("Starting usb_thread: %u", (unsigned int)QThread::currentThreadId()); qDebug("Starting usb_thread: %lu", (unsigned long)QThread::currentThreadId());
setActive(true); setActive(true);
@@ -84,7 +84,7 @@ void CmaClient::connectWireless()
QTime now = QTime::currentTime(); QTime now = QTime::currentTime();
qsrand(now.msec()); qsrand(now.msec());
qDebug("Starting wireless_thread: %u", (unsigned int)QThread::currentThreadId()); qDebug("Starting wireless_thread: %lu", (unsigned long)QThread::currentThreadId());
setActive(true); setActive(true);

View File

@@ -40,7 +40,7 @@ CmaEvent::CmaEvent(vita_device_t *s_device) :
void CmaEvent::process() void CmaEvent::process()
{ {
qDebug("Starting event_thread: %u", (unsigned int)QThread::currentThreadId()); qDebug("Starting event_thread: %lu", (unsigned long)QThread::currentThreadId());
while(true) { while(true) {
sema.acquire(); sema.acquire();
if(!isActive()) { if(!isActive()) {

View File

@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
app.installTranslator(&translator); app.installTranslator(&translator);
} }
qDebug("Starting main thread: %u", (unsigned int)QThread::currentThreadId()); qDebug("Starting main thread: %lu", (unsigned long)QThread::currentThreadId());
// set the organization/application for QSettings to work properly // set the organization/application for QSettings to work properly
app.setOrganizationName("qcma"); app.setOrganizationName("qcma");

View File

@@ -101,3 +101,4 @@ unix {
win32:RC_FILE = qcma.rc win32:RC_FILE = qcma.rc
win32:QMAKE_CXXFLAGS += -mno-ms-bitfields win32:QMAKE_CXXFLAGS += -mno-ms-bitfields
macx:QT_CONFIG -= no-pkg-config

View File

@@ -40,9 +40,9 @@ bool getDiskSpace(const QString &dir, quint64 *free, quint64 *total)
} }
#else #else
struct statvfs64 stat; struct statvfs stat;
if(statvfs64(dir.toUtf8().data(), &stat) == 0) { if(statvfs(dir.toUtf8().data(), &stat) == 0) {
*total = stat.f_frsize * stat.f_blocks; *total = stat.f_frsize * stat.f_blocks;
*free = stat.f_frsize * stat.f_bfree; *free = stat.f_frsize * stat.f_bfree;
return true; return true;