Fix compilation under 64bit Windows and standarize the format of the thread ID.

This commit is contained in:
codestation
2013-12-19 00:03:13 -04:30
parent 0fc2198436
commit d6831fc6c6
4 changed files with 8 additions and 6 deletions

View File

@@ -64,7 +64,7 @@ INCLUDEPATH += src/
CONFIG += link_pkgconfig
PKGCONFIG += libvitamtp libavformat libavcodec libavutil libswscale
QMAKE_CXXFLAGS += -Wno-write-strings -Wall -D__STDC_CONSTANT_MACROS
QMAKE_CXXFLAGS += -Wno-write-strings -Wall -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
RESOURCES += qcmares.qrc

View File

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

View File

@@ -26,7 +26,6 @@
#include <QSettings>
#include <QUrl>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
Database *CmaEvent::db = NULL;
@@ -40,7 +39,8 @@ CmaEvent::CmaEvent(vita_device_t *s_device) :
void CmaEvent::process()
{
qDebug("Starting event_thread: %lu", (unsigned long)QThread::currentThreadId());
qDebug("Starting event_thread: 0x%016" PRIxPTR, (quintptr)QThread::currentThreadId());
while(true) {
sema.acquire();
if(!isActive()) {

View File

@@ -26,6 +26,8 @@
#include <QThread>
#include <QTranslator>
#include <inttypes.h>
#include "singleapplication.h"
#include "mainwidget.h"
@@ -87,7 +89,7 @@ int main(int argc, char *argv[])
app.installTranslator(&translator);
}
qDebug("Starting main thread: %lu", (unsigned long)QThread::currentThreadId());
qDebug("Starting main thread: 0x%016" PRIxPTR, (quintptr)QThread::currentThreadId());
// set the organization/application for QSettings to work properly
app.setOrganizationName("qcma");