Mac build fixes

This commit is contained in:
John Maguire 2010-02-10 13:15:18 +00:00
parent 19ff8dab4b
commit 61e5428be9
4 changed files with 12 additions and 2 deletions

View File

@ -227,6 +227,8 @@ MainWindow::MainWindow(QWidget *parent)
connect(tray_icon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(TrayClicked(QSystemTrayIcon::ActivationReason)));
// Global shortcuts
// Breaks on OS X.
#ifndef Q_OS_DARWIN
QxtGlobalShortcut* play_pause = new QxtGlobalShortcut(QKeySequence("Media Play"), this);
QxtGlobalShortcut* stop = new QxtGlobalShortcut(QKeySequence("Media Stop"), this);
QxtGlobalShortcut* next = new QxtGlobalShortcut(QKeySequence("Media Next"), this);
@ -235,6 +237,7 @@ MainWindow::MainWindow(QWidget *parent)
connect(stop, SIGNAL(activated()), ui_.action_stop, SLOT(trigger()));
connect(next, SIGNAL(activated()), ui_.action_next_track, SLOT(trigger()));
connect(prev, SIGNAL(activated()), ui_.action_previous_track, SLOT(trigger()));
#endif // Q_OS_DARWIN
// Settings
connect(settings_dialog_, SIGNAL(accepted()), player_, SLOT(ReloadSettings()));

View File

@ -1,10 +1,11 @@
#ifndef SOMAFMSERVICE_H
#define SOMAFMSERVICE_H
#include <QXmlStreamReader>
#include "radioservice.h"
class QNetworkAccessManager;
class QXmlStreamReader;
class QMenu;
class SomaFMService : public RadioService {

View File

@ -336,11 +336,13 @@ bool Song::Save() const {
ref.tag()->setTrack(d->track_);
bool ret = ref.save();
#ifdef Q_OS_LINUX
if (ret) {
// Linux: inotify doesn't seem to notice the change to the file unless we
// change the timestamps as well. (this is what touch does)
utimensat(0, QFile::encodeName(d->filename_).constData(), NULL, 0);
}
#endif // Q_OS_LINUX
return ret;
}

View File

@ -120,7 +120,11 @@ XineEngine::init()
#ifdef Q_OS_WIN32
putenv(QString("XINE_PLUGIN_PATH=" +
QCoreApplication::applicationDirPath() + "/xine/plugins").toAscii().constData());
#endif
#endif // Q_OS_WIN32
#ifdef Q_OS_DARWIN
setenv("XINE_PLUGIN_PATH", QString(QCoreApplication::applicationDirPath() + "/../PlugIns/xine").toAscii().constData(), 1);
#endif // Q_OS_DARWIN
QMutexLocker l(&m_initMutex);