Fix compilation in release mode

This commit is contained in:
David Sansome 2010-03-23 14:07:05 +00:00
parent 79527447e2
commit ceb6382e9f
6 changed files with 25 additions and 1 deletions

View File

@ -191,7 +191,7 @@ void QtLocalPeer::receiveConnection()
uMsgBuf += got;
} while (remaining && got >= 0 && socket->waitForReadyRead(2000));
if (got < 0) {
qWarning() << "QtLocalPeer: Message reception failed" << socket->errorString();
qWarning("QtLocalPeer: Message reception failed %s", socket->errorString().toUtf8().constData());
delete socket;
return;
}

View File

@ -59,6 +59,7 @@ set(CLEMENTINE-SOURCES
playlistsequence.cpp
xspfparser.cpp
globalshortcuts/globalshortcuts.cpp
fixlastfm.cpp
)
# Header files that have Q_OBJECT in

8
src/fixlastfm.cpp Normal file
View File

@ -0,0 +1,8 @@
#include "fixlastfm.h"
#ifdef QT_NO_DEBUG_OUTPUT
QDebug& operator<<(QDebug& d, const QUrl&) {
return d;
}
#endif

13
src/fixlastfm.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef FIXLASTFM_H
#define FIXLASTFM_H
// Include this before <lastfm/Track> to fix a compile error in release mode
#ifdef QT_NO_DEBUG_OUTPUT
# include <QtDebug>
# include <QUrl>
// Stub this out so lastfm/Track still compiles
QDebug& operator<<(QDebug&, const QUrl&);
#endif
#endif

View File

@ -9,6 +9,7 @@ class Track;
#include <QtGlobal>
uint qHash(const lastfm::Track& track);
#include "fixlastfm.h"
#include <lastfm/Track>
#include <lastfm/ws.h>

View File

@ -19,6 +19,7 @@
#include <taglib/speexfile.h>
#include <taglib/trueaudiofile.h>
#include "fixlastfm.h"
#include <lastfm/Track>
#include <QFile>