s/Q_OS_WIN32/Q_OS_WIN/g
This commit is contained in:
committed by
craig.p.drummond
parent
27bc161f39
commit
a97a7e5d27
@@ -39,9 +39,6 @@ void BackdropCreator::enableDebug()
|
||||
BackdropCreator::BackdropCreator()
|
||||
: QObject(0)
|
||||
{
|
||||
#ifdef Q_OS_WIN32
|
||||
srand((unsigned int)time(0));
|
||||
#endif
|
||||
connect(Covers::self(), SIGNAL(cover(const Song &, const QImage &, const QString &)), SLOT(coverRetrieved(const Song &, const QImage &, const QString &)));
|
||||
imageSize=QApplication::fontMetrics().height()*12;
|
||||
thread=new Thread(metaObject()->className());
|
||||
|
||||
@@ -75,7 +75,7 @@ void FreeSpaceInfo::update()
|
||||
totalSize=quint64(fs_info.f_blocks) * quint64(fs_info.f_bsize);
|
||||
usedSpace=totalSize-(quint64(fs_info.f_bavail) * quint64(fs_info.f_bsize));
|
||||
}
|
||||
#elif defined(Q_OS_WIN32)
|
||||
#elif defined(Q_OS_WIN)
|
||||
_ULARGE_INTEGER totalRet;
|
||||
_ULARGE_INTEGER freeRet;
|
||||
if (0!=GetDiskFreeSpaceEx(QDir::toNativeSeparators(location).toLocal8Bit().constData(), &freeRet, &totalRet, NULL)) {
|
||||
|
||||
@@ -115,7 +115,7 @@ InterfaceSettings::InterfaceSettings(QWidget *p)
|
||||
#ifdef QT_QTDBUS_FOUND
|
||||
// We have dbus, check that org.freedesktop.Notifications exists
|
||||
bool enableNotifications=QDBusConnection::sessionBus().interface()->isServiceRegistered("org.freedesktop.Notifications");
|
||||
#elif !defined Q_OS_WIN32 && !defined Q_OS_MAC
|
||||
#elif !defined Q_OS_WIN && !defined Q_OS_MAC
|
||||
// Not mac, or windows, and no dbus => no notifications!
|
||||
bool enableNotifications=false;
|
||||
#endif
|
||||
|
||||
@@ -180,7 +180,7 @@ MPDConnectionDetails Settings::connectionDetails(const QString &name)
|
||||
details.password=cfg.get("connectionPasswd", name.isEmpty() ? mpdDefaults.passwd : QString());
|
||||
#endif
|
||||
details.port=cfg.get("connectionPort", name.isEmpty() ? mpdDefaults.port : 6600);
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
details.dir=Utils::fixPath(QDir::fromNativeSeparators(cfg.get("mpdDir", mpdDefaults.dir)));
|
||||
#else
|
||||
details.dir=Utils::fixPath(cfg.get("mpdDir", mpdDefaults.dir));
|
||||
@@ -196,7 +196,7 @@ MPDConnectionDetails Settings::connectionDetails(const QString &name)
|
||||
cfg.beginGroup(n);
|
||||
details.hostname=cfg.get("host", name.isEmpty() ? mpdDefaults.host : QString());
|
||||
details.port=cfg.get("port", name.isEmpty() ? mpdDefaults.port : 6600);
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
details.dir=Utils::fixPath(QDir::fromNativeSeparators(cfg.get("dir", name.isEmpty() ? mpdDefaults.dir : "/var/lib/mpd/music")));
|
||||
#else
|
||||
details.dir=Utils::fixPath(cfg.get("dir", name.isEmpty() ? mpdDefaults.dir : "/var/lib/mpd/music"));
|
||||
@@ -810,7 +810,7 @@ QStringList Settings::hiddenOnlineProviders()
|
||||
return cfg.get("hiddenOnlineProviders", QStringList());
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WIN32
|
||||
#ifndef Q_OS_WIN
|
||||
bool Settings::inhibitSuspend()
|
||||
{
|
||||
return cfg.get("inhibitSuspend", false);
|
||||
@@ -1383,7 +1383,7 @@ void Settings::saveHiddenOnlineProviders(const QStringList &v)
|
||||
cfg.set("hiddenOnlineProviders", v);
|
||||
}
|
||||
|
||||
#ifndef Q_OS_WIN32
|
||||
#ifndef Q_OS_WIN
|
||||
void Settings::saveInhibitSuspend(bool v)
|
||||
{
|
||||
cfg.set("inhibitSuspend", v);
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
bool showTimeRemaining();
|
||||
QStringList hiddenStreamCategories();
|
||||
QStringList hiddenOnlineProviders();
|
||||
#ifndef Q_OS_WIN32
|
||||
#ifndef Q_OS_WIN
|
||||
bool inhibitSuspend();
|
||||
#endif
|
||||
int rssUpdate();
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
void saveShowTimeRemaining(bool v);
|
||||
void saveHiddenStreamCategories(const QStringList &v);
|
||||
void saveHiddenOnlineProviders(const QStringList &v);
|
||||
#ifndef Q_OS_WIN32
|
||||
#ifndef Q_OS_WIN
|
||||
void saveInhibitSuspend(bool v);
|
||||
#endif
|
||||
void saveRssUpdate(int v);
|
||||
|
||||
@@ -97,7 +97,7 @@ void TrayItem::setup()
|
||||
return;
|
||||
}
|
||||
|
||||
#if !defined Q_OS_WIN32 && !defined Q_OS_MAC
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_MAC
|
||||
QString iconFile=CANTATA_SYS_ICONS_DIR+QIcon::themeName()+QLatin1String("/systray.svg");
|
||||
#endif
|
||||
|
||||
@@ -141,7 +141,7 @@ void TrayItem::setup()
|
||||
trayItemMenu->addAction(mw->quitAction);
|
||||
trayItem->setContextMenu(trayItemMenu);
|
||||
Icon icon;
|
||||
#if !defined Q_OS_WIN32 && !defined Q_OS_MAC
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_MAC
|
||||
if (QFile::exists(iconFile)) {
|
||||
icon.addFile(iconFile);
|
||||
}
|
||||
|
||||
@@ -822,7 +822,7 @@ void Utils::touchFile(const QString &fileName)
|
||||
|
||||
bool Utils::isDirReadable(const QString &dir)
|
||||
{
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
if (dir.isEmpty()) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -842,7 +842,7 @@ bool Utils::isDirReadable(const QString &dir)
|
||||
double Utils::smallFontFactor(const QFont &f)
|
||||
{
|
||||
double sz=f.pointSizeF();
|
||||
#if defined Q_OS_WIN32
|
||||
#if defined Q_OS_WIN
|
||||
if (sz<8.5) {
|
||||
return 1.0;
|
||||
}
|
||||
@@ -895,7 +895,7 @@ int Utils::scaleForDpi(int v)
|
||||
|
||||
Utils::Desktop Utils::currentDe()
|
||||
{
|
||||
#if !defined Q_OS_WIN32 && !defined Q_OS_MAC
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_MAC
|
||||
static int de=-1;
|
||||
if (-1==de) {
|
||||
de=Other;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <KDE/KStandardDirs>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
#include <time.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
|
||||
@@ -169,7 +169,7 @@ static TagLib::FileRef getFileRef(const QString &path)
|
||||
{
|
||||
ensureFileTypeResolvers();
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
return TagLib::FileRef(reinterpret_cast<const wchar_t*>(path.constData()), true, TagLib::AudioProperties::Fast);
|
||||
#else
|
||||
return TagLib::FileRef(QFile::encodeName(path).constData(), true, TagLib::AudioProperties::Fast);
|
||||
@@ -1278,7 +1278,7 @@ Update embedImage(const QString &fileName, const QByteArray &cover)
|
||||
QString oggMimeType(const QString &fileName)
|
||||
{
|
||||
LOCK_MUTEX
|
||||
#ifdef Q_OS_WIN32
|
||||
#ifdef Q_OS_WIN
|
||||
const wchar_t*encodedName=reinterpret_cast<const wchar_t*>(fileName.constData());
|
||||
#else
|
||||
const char *encodedName=QFile::encodeName(fileName).constData();
|
||||
|
||||
Reference in New Issue
Block a user